summaryrefslogtreecommitdiff
path: root/upb/json/parser.c
AgeCommit message (Collapse)Author
2019-03-24Replace strptime with custom implementationBo Yang
2019-03-24Fix parsing repeated well known type value (#153)Paul Yang
* Fix parsing repeated well known type value * Fix generated file * Fix comment
2019-03-05Fix for Windows.Josh Haberman
2019-03-05Merge branch 'master' into defcleanupJoshua Haberman
2019-03-05Fix the issue for strptimeBo Yang
* Define _XOPEN_SOURCE * Exclude usage on windows
2019-01-17Moved some definitions to def.hJoshua Haberman
2019-01-17Merge branch 'arrayapi' into defcleanupJoshua Haberman
2019-01-16Supprot FieldMask json encoding/decoding. (#147)Paul Yang
2019-01-15Take sinks by value.Joshua Haberman
2019-01-15All tests pass again!Joshua Haberman
2019-01-14WIP.Joshua Haberman
2019-01-12A lot more tests are working now.Joshua Haberman
2019-01-09upb_refcounted is gone! Some tests still to fix.Joshua Haberman
2018-12-22Merge branch 'master' into defcleanupJoshua Haberman
2018-12-13Fix generated file testBo Yang
2018-12-12Add support for encoding Any in jsonBo Yang
2018-12-10WIP, core library compiles now.Joshua Haberman
2018-12-04Implement json decoding for Any message. (#130)Paul Yang
* 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
2018-11-03Bazel builds everything except conformance_upb.Josh Haberman
2018-10-05Fix json ignore unknown (#128)Paul Yang
* Fix json ignore unknown Previously, there were several problems with ignoring unknown in json. 1) After finding a field is unknown, the parser's state is not changed. Thus, there is no way to distinguish whether the parser is dealing with an unknown field or it's just a top level message. 2) Several method didn't respect unknown field, e.g., start_object, end_bool, start_array. * Update json parser size * Update json parser size
2018-09-21Fix mac use local timezone for strptime by default. (#127)Paul Yang
* Fix mac use local timezone for strptime by default. * Fix comments * Check len == UPB_TIMESTAMP_BASE_SIZE * Fix comment
2018-09-18Fix json encoding for wrappers, ListValue, Struct and Value. (#126)Paul Yang
* Fix json encoding for wrappers, ListValue, Struct and Value. * Add well_known_type field in upb_msgdef to specify type of well known messages. * Remove comma at end of enum definition. * Group number wrappers * Fix comments * Refactoring to use is_wellknown_{msg/field}
2018-09-06Initialize valueBo Yang
2018-09-06Fix json parsing for Struct, ListValue and Value.Bo Yang
2018-08-29Fix json encoding/decoding for duration. (#118)Paul Yang
* Fix json encoding/decoding for duration. * Use lld for int64_t * Cast int64_t to long
2018-08-24Fix json parsing for timestamp (#115)Paul Yang
* Fix json parsing for timestamp * Fix json encoding for timestamp * Implement timestamp_machine to parse timestamp * Remove comparision for size_t and 0 * Increase defined printer size * Increase size * Increase parser size * Mark json_en_timestamp_machine unused
2018-08-09Use special eof char to mark end of parsingBo Yang
2018-08-09Move logic away from ragel machineBo Yang
2018-08-05Remove unused codeBo Yang
2018-08-05Make value top levelBo Yang
2018-08-01Mark unused variableBo Yang
2018-07-31Update ragel generated fileBo Yang
2018-06-27Enable ignore unknown field in json parsingBo Yang
2017-06-19Responded to PR comments. This also fixed a few more conformance tests.Josh Haberman
2017-06-08Some fixes to make JSON properly recognize numbers in quotes.Josh Haberman
2016-09-01Updated generated code.Josh Haberman
2016-05-12Added UPB_ASSERT() that helps avoid unused var warnings.Joshua Haberman
* Added UPB_ASSERT() that helps avoid unused var warnings. * Addressed PR comments. * Fixed assert in the JIT.
2016-04-19Split upb::Arena/upb::Allocator from upb::Environment. (#58)Joshua Haberman
* Split upb::Arena/upb::Allocator from upb::Environment. This will allow arenas and allocators to be used independently of environments, which will be important for an upcoming change (a message representation). Overall this design feels cleaner that the previous Environment/SeededAllocator design. As part of this change, moved all allocations in upb to use a global allocator instead of hard-coding malloc/free. This will allow injecting OOM faults for more robust testing. One place that doesn't use the global allocator is the tracked ref code. Instead of its previous approach of CHECK_OOM() after every malloc() or table insert, it simply uses an allocator that does this automatically. I moved Allocator/Arena/Environment into upb.h. This seems principled since these are the only types in upb whose size is directly exposed to users, since they form the basis of memory allocation strategy. * Cleaned up some header includes and fixed more malloc -> upb_gmalloc(). * Changes from PR review. * Don't use UINTPTR_MAX or UINT64_MAX. * Punt on adding line/file for now. * We actually can't store (uint64_t)-1, update comment and test.
2016-04-15Also regenerate JSON parser.Josh Haberman
2016-04-14JSON parser: always accept both name variants, flag controls which we generate.Joshua Haberman
* JSON parser: always accept both name variants, flag controls which we generate. My previous commit was based on wrong information about the proto3 JSON spec. It turns out we need to accept both field name formats all the time, and a runtime flag should control which we generate. * Documented the preserve_proto_fieldnames option. * Fix bugs in PR.
2016-04-14Added migration flag for users using old JSON format.Josh Haberman
2016-02-17Addressed code review comments.Josh Haberman
2016-02-17Changed JSON parser/printer to correctly camelCase names.Josh Haberman
2015-07-15Clear JSON parser status in reset.Josh Haberman
2015-07-15Updated JSON parser size.Josh Haberman
2015-07-15Fixed JSON parser error reporting.Josh Haberman
This was previously broken -- it would try to set the status object on the parser, but the pointer was never initialized. Also it didn't report errors properly to the environment object.
2015-07-07Updated license headers for Ragel source also.Josh Haberman
2015-06-02Ported upb to C89, for greater portability.Josh Haberman
A large part of this change contains surface-level porting, like moving variable declarations to the top of the block. However there are a few more substantial things too: - moved internal-only struct definitions to a separate file (structdefs.int.h), for greater encapsulation and ABI compatibility. - removed the UPB_UPCAST macro, since it requires access to the internal-only struct definitions. Replaced uses with calls to inline, type-safe casting functions. - removed the UPB_DEFINE_CLASS/UPB_DEFINE_STRUCT macros. Class and struct definitions are now more explicit -- you get to see the actual class/struct keywords in the source. The casting convenience functions have been moved into UPB_DECLARE_DERIVED_TYPE() and UPB_DECLARE_DERIVED_TYPE2(). - the new way that we duplicate base methods in derived types is also more convenient and requires less duplication. It is also less greppable, but hopefully that is not too big a problem. Compiler flags (-std=c89 -pedantic) should help to rigorously enforce that the code is free of C99-isms. A few functions are not available in C89 (strtoll). There are temporary, hacky solutions in place.
2015-05-08Merge from open-source development.Josh Haberman
2015-05-08Google-internal development.Josh Haberman
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback