From 8f8113b4fff748b57b0ff2f1a301e86b4703be84 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Tue, 9 Dec 2014 12:27:22 -0800 Subject: JSON test, symbolic enum names in JSON, and a few improvements. - Added a JSON test that round-trips (parses then re-serializes) several test messages, ensuring that the re-serialized form matches the original exactly. - Added support for printing and parsing symbolic enum names (rather than integer values) in JSON. - Updated JSON printer to properly handle string fields that come in multiple pieces. ('bytes' fields still do not support this, and this work is more challenging because it requires making the base64 encoder resumable. Base64 encoding is not separable at an input-byte granularity, unlike string escaping.) - Fixed a < vs. <= bug in UTF-8 encoding generation (oops). --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b2c4036..732f498 100644 --- a/Makefile +++ b/Makefile @@ -235,6 +235,7 @@ C_TESTS = \ CC_TESTS = \ tests/pb/test_decoder \ + tests/json/test_json \ tests/test_cpp \ tests/test_table \ @@ -264,6 +265,7 @@ tests/test_handlers: LIBS = lib/libupb.descriptor.a lib/libupb.a tests/pb/test_decoder: LIBS = lib/libupb.pb.a lib/libupb.a tests/test_cpp: LIBS = $(LOAD_DESCRIPTOR_LIBS) lib/libupb.a tests/test_table: LIBS = lib/libupb.a +tests/json/test_json: LIBS = lib/libupb.a lib/libupb.json.a tests/test_def: tests/test.proto.pb -- cgit v1.2.3