Neal Patel
baefa5cf6e
Fix decoding null values on non-pointer fields
2025-01-09 11:27:28 -08:00
Neal Patel
529b1f6f7e
Fix unmarshal null to existing value
2024-12-18 21:43:31 -08:00
Zik
853c4976cc
Remove spurious print ( #300 )
2020-08-10 12:17:50 +03:00
Alexandr Mayorskiy
3b0c433891
Revert "Don't pass field tags into nested types"
...
This reverts commit 9e9dfede4e .
2020-04-15 00:45:56 +03:00
Kirill Korotaev
f27c653a50
don't allow intern/nocopy tags at the same time
2020-04-12 21:22:21 +03:00
Kirill Korotaev
244a66fa8f
Add "nocopy" json tag to return unsafe string reference
...
When large amounts of data are unmarshaled for immediate non long live use than
copying of strings from original buffer can be avoided and instead a
reference to the original buffer returned in the field value.
Note, if the value requires unescaping, than it will be processed as
normally done with copying.
Signed-off-by: Kirill Korotaev <kirillx@gmail.com >
2020-04-12 20:48:07 +03:00
GoWebProd
0d5e07263b
Merge pull request #202 from makarchuk/better-interfaces-support
...
Add checks for json/easyjson marshaler/unmarshaler interfaces
2020-04-12 19:26:52 +03:00
Alexandr Mayorskiy
6ea07b37bb
Merge branch 'cafxx-intern' of git://github.com/CAFxX/easyjson into CAFxX-cafxx-intern
2020-04-12 17:56:50 +03:00
GoWebProd
67202f7869
Merge pull request #271 from creker/NestedOmitempty
...
Don't pass fields tags into nested types
2020-04-12 17:32:32 +03:00
Kirill Korotaev
33d35f870a
unescaping: should process string numbers in unescaped member names mode
...
There was a small glitch:
numbers as strings where not unescaped in -disable_members_unescape
mode, though this mode was implied to affect field names only.
2020-04-11 20:20:50 +03:00
Kirill Korotaev
9a01c9afdb
Add new -disable_members_unescape option to avoid unescaping of member names, ints, ...
...
Improves performance for about 15% on BenchmarkEJ_Unmarshal_M-8
2020-04-11 19:11:39 +03:00
Carlo Alberto Ferraris
c124e4243f
Implement optional string interning
...
Fixes https://github.com/mailru/easyjson/issues/191
2020-04-08 08:08:39 +09:00
GoWebProd
7db1436caf
Merge branch 'master' into master
2020-03-30 23:46:53 +03:00
GoWebProd
e790aae53f
Merge pull request #204 from hhh0pE/unnamed_embedded_field
...
improved gen getStructFields: for anonymous field that is not a struct.
2020-03-30 23:38:48 +03:00
GoWebProd
8c3dabd22a
Merge pull request #245 from Bogdan-D/bugfix/zero_divide
...
fix panic divide by zero
2020-03-30 23:12:59 +03:00
creker
9e9dfede4e
Don't pass field tags into nested types
2020-03-03 16:41:45 +03:00
Anton Sulaev
e17df41dc6
add interfaces to provide marshal/unmarshal logic for unknown fields in struct
2020-02-17 19:52:40 +03:00
Aravind Gopalan
d6768890ec
Allow empty maps for required map fields (issue #256 )
...
As reported in issue #256 , currently, an empty map is unmarshalled into nil by easyjson
If a field is marked "required" or "!omitempty", then the empty map is a valid input and
we should unmarshal it into an empty map.
Similar logic for marshalling.
This change is to fix the behavior
2019-11-21 18:03:16 -08:00
Bogdan D
e719468005
fix panic divide by zero
2019-08-08 13:08:02 +03:00
Aleksandr Petrukhin
a0e09156bb
[decoder] implemented encoding.Marshaler for map keys
2019-04-03 16:25:01 +00:00
Timur
82d245f54e
Better support for custom interfaces. Bring all of the original checks back
2019-03-23 13:02:58 +03:00
Vasily Romanov
6243d8e04c
Merge pull request #209 from shmel1k/bugfix/issue_207_fix_reference_to_pointer
...
[decoder] remove unnecessary reference to a pointer
2019-02-21 10:54:03 +03:00
Aleksandr Petrukhin
b27fccced4
[decoder] remove unnecessary reference to a pointer
2019-02-20 21:52:23 +00:00
DESKTOP-NJM1EHE\vlad
6a8072e759
more strict if
2019-02-02 22:06:25 +02:00
DESKTOP-NJM1EHE\vlad
9dbc6d1bf9
improved getStructFields: for anonymous field that is not struct.
...
testCase:
type DurationInSeconds struct {
time.Duration
}
func(dis DurationInSeconds) func1() {}
func(dis DurationInSeconds) func2() {}
2019-02-02 21:55:42 +02:00