-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Could the following two lines of code be switched around ?
purescript-argonaut-generic/src/Data/Argonaut/Encode/Generic.purs
Lines 43 to 44 in 3ae9622
$ FO.insert e.tagKey (fromString (reflectSymbol (Proxy :: Proxy name))) | |
$ FO.insert e.valuesKey values |
Reason being that right now values come first in the encoded json and tag later. But for decoding it can potentially be faster to first get the tag to get of the type (FP) or class (OO) that the values have to be deserialized into.
Also for debugging it's nicer to see tag first and (potentially long) value string after that.
Metadata
Metadata
Assignees
Labels
No labels