Skip to content

Commit b53096c

Browse files
committed
Replace cJSON with lightweight mkjson library
Based on PR mvp#575 feedback, this commit replaces the large cJSON library with the much smaller mkjson library for JSON output generation. Changes: - Replace cJSON (3,443 lines) with mkjson (357 lines) - ~10x reduction - Optimize JSON output to only emit true boolean flags - Use shorter field names (vid, pid, nports, ppps) - Fix code style issues (remove stdbool.h, change ret to rc) - Fix USB Full Speed detection for USB 2.0 devices - Add USB speed reference citation - Add missing newline at end of Makefile The JSON output format remains compatible while significantly reducing the library size as requested.
1 parent ec1d293 commit b53096c

File tree

6 files changed

+680
-3622
lines changed

6 files changed

+680
-3622
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ else
3636
endif
3737

3838
PROGRAM = uhubctl
39-
SOURCES = $(PROGRAM).c cJSON.c
39+
SOURCES = $(PROGRAM).c mkjson.c
4040
OBJECTS = $(SOURCES:.c=.o)
4141

4242
all: $(PROGRAM)
@@ -54,4 +54,4 @@ install:
5454
clean:
5555
$(RM) $(OBJECTS) $(PROGRAM).dSYM $(PROGRAM)
5656

57-
.PHONY: all install clean
57+
.PHONY: all install clean

0 commit comments

Comments
 (0)