You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using your library to aid with message signature verification via a hash from a legacy system, where reconstructing the original structure in the exact same order is paramount.
Consider the following json:
Loaded into an OrderedMap then iterated through, like so (omitting error handling for brevity):
All the values at the root level are processed in the right order 100% of the time. The "stuff" array however is a map[string]interface{} which by its own nature is unordered. Therefore its contents can come out in any random order.
These should probably be unmarshalled into another OrderedObject
The text was updated successfully, but these errors were encountered:
luispabon
changed the title
Ordered object: array within array doesn't respect order
Ordered object: object within json doesn't respect order
Jan 25, 2019
Hm, I thought it did that -- though I didn't write the code, just hosting it for convenience. :) If it doesn't, then that sounds like a bug to me. I'm on vacation until mid-February, but I'm happy to review any pull requests with that testcase added.
I'm currently using your library to aid with message signature verification via a hash from a legacy system, where reconstructing the original structure in the exact same order is paramount.
Consider the following json:
Loaded into an OrderedMap then iterated through, like so (omitting error handling for brevity):
All the values at the root level are processed in the right order 100% of the time. The "stuff" array however is a
map[string]interface{}
which by its own nature is unordered. Therefore its contents can come out in any random order.These should probably be unmarshalled into another
OrderedObject
The text was updated successfully, but these errors were encountered: