Joshua Haberman
88b1026d26
Fixed leap year handling by reworking upb_mktime() -> upb_timegm().
...
The new function name also better reflects the semantics of the
function. Like timegm(), this function always converts to/from
UTC, not local time.
5 years ago
Paul Yang
d3762e96cb
Accpet string for numeric wrappers ( #202 )
5 years ago
Esun Kim
2c3a28e411
Add -Wstrict-prototypes option
5 years ago
Esun Kim
7a1e6aa84b
Support MSVC prior to 2015
5 years ago
Bo Yang
a6347ec35e
Change methods name to specify as number/string
6 years ago
Bo Yang
8e5f03f719
Fix integer types
6 years ago
Bo Yang
c50e849ac2
Change int64 json encoding to be string
6 years ago
Joshua Haberman
811ee4f442
Use a custom mktime() function to avoid platform dependencies.
6 years ago
Joshua Haberman
985145ca16
Fixed amalgamation and CMake build.
6 years ago
Joshua Haberman
cf35baa1ad
Moved macros from upb.h to port_def.inc to avoid leaking them to users. ( #160 )
...
* Use port_def.inc to prevent macros from leaking to users.
* Added helpful comments to port_def.inc/port_undef.inc.
6 years ago
Joshua Haberman
928ef7f2c0
Removed reflection and other extraneous things from the core library. ( #158 )
...
* Removed reflection and other extraneous things from the core library.
* Added missing files and ran buildifier.
* New CMakeLists.txt.
* Made table its own cc_library() for internal usage.
6 years ago
Paul Yang
a8a0bc73b9
Allow bytes field to be longer than 16000 bytes ( #157 )
6 years ago
Bo Yang
3c4f0347f9
Replace strptime with custom implementation
6 years ago
Paul Yang
56fefe2a50
Fix parsing repeated well known type value ( #153 )
...
* Fix parsing repeated well known type value
* Fix generated file
* Fix comment
6 years ago
Josh Haberman
71ec01e34b
Fix for Windows.
6 years ago
Bo Yang
da8d1392c1
Fix the issue for strptime
...
* Define _XOPEN_SOURCE
* Exclude usage on windows
6 years ago
Bo Yang
12a5297740
Fix empty FieldMask json encoding
6 years ago
Joshua Haberman
8cd3b9dfa9
Moved some definitions to def.h
6 years ago
Paul Yang
c7870e0f77
Supprot FieldMask json encoding/decoding. ( #147 )
6 years ago
Joshua Haberman
2c26f60dbb
Added some comments and reversed upb_arena_cleanup() args.
6 years ago
Joshua Haberman
f30c7f4acb
Take sinks by value.
6 years ago
Joshua Haberman
754b9f1cfd
All tests pass again!
6 years ago
Joshua Haberman
cb26d883d1
WIP.
6 years ago
Joshua Haberman
48863ea0be
A lot more tests are working now.
6 years ago
Joshua Haberman
d2f9bec5c6
Removed old-style C++ handlers that relied on UB in favor of more normal ones.
6 years ago
Joshua Haberman
0553eff64a
upb_refcounted is gone! Some tests still to fix.
6 years ago
Bo Yang
18563bee4c
Fix comments
6 years ago
Bo Yang
99600b4a0e
Fix generated file test
6 years ago
Bo Yang
375a25423e
Mark unused parameter
6 years ago
Bo Yang
915806ea8d
Remove unused code
6 years ago
Bo Yang
b39dbb9d40
Add support for encoding Any in json
6 years ago
Joshua Haberman
336402b4d7
WIP, core library compiles now.
6 years ago
Paul Yang
13c59cb051
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
6 years ago
Josh Haberman
2655ed9cf5
Bazel builds everything except conformance_upb.
6 years ago
Paul Yang
3c742bfdc8
Fix json ignore unknown ( #128 )
...
* 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
6 years ago
Paul Yang
b258ae3235
Fix mac use local timezone for strptime by default. ( #127 )
...
* Fix mac use local timezone for strptime by default.
* Fix comments
* Check len == UPB_TIMESTAMP_BASE_SIZE
* Fix comment
6 years ago
Paul Yang
706ffdbc65
Fix json encoding for wrappers, ListValue, Struct and Value. ( #126 )
...
* 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}
6 years ago
Bo Yang
81fbb4ffa7
Initialize value
6 years ago
Bo Yang
6c910330c4
Fix json parsing for Struct, ListValue and Value.
6 years ago
Paul Yang
6c4469e189
Fix json encoding/decoding for duration. ( #118 )
...
* Fix json encoding/decoding for duration.
* Use lld for int64_t
* Cast int64_t to long
6 years ago
Paul Yang
38d674e86f
Fix json parsing for timestamp ( #115 )
...
* 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
6 years ago
Bo Yang
a8d1a5933d
Use special eof char to mark end of parsing
6 years ago
Bo Yang
d4caefaade
Move logic away from ragel machine
6 years ago
Bo Yang
f1d7570f30
Remove unused code
6 years ago
Bo Yang
ac9d4468f5
Make value top level
6 years ago
Bo Yang
ae2f1cdb17
Mark unused variable
6 years ago
Bo Yang
cc27a5b576
Update ragel generated file
6 years ago
Bo Yang
9449cf68cc
Make top level wrapper value parsing work
6 years ago
Bo Yang
20f1b6df41
Fix json decoding for wrapper messages
6 years ago
Bo Yang
72e66e2b55
Enable ignore unknown field in json parsing
7 years ago