From 13c59cb051c4deee5367f9c5fc7b5d07363496a0 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 4 Dec 2018 15:21:32 -0800 Subject: Implement json decoding for Any message. (#130) * Implement json decoding for Any message. type url may not appear as the first value in json. As a result, other data cannot be resolved before resolving type url. To solve that, this change caches the start and end position of unparsed values and resolve them in end_any_object when type url has been resolved. * Handle Any in switch * Update json parser size * Fix comments * Sync upstream * Add dependency on upb_pb for upb_json * Debug failed test * Fix cmake * Update test generated files * Remove debug tests --- upb/json/printer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'upb/json/printer.c') diff --git a/upb/json/printer.c b/upb/json/printer.c index edffa3b..fe306d4 100644 --- a/upb/json/printer.c +++ b/upb/json/printer.c @@ -1073,6 +1073,8 @@ void printer_sethandlers(const void *closure, upb_handlers *h) { switch (upb_msgdef_wellknowntype(md)) { case UPB_WELLKNOWN_UNSPECIFIED: break; + case UPB_WELLKNOWN_ANY: + break; case UPB_WELLKNOWN_DURATION: printer_sethandlers_duration(closure, h); return; -- cgit v1.2.3