Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Unpacker #6

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Implement Unpacker #6

wants to merge 28 commits into from

Conversation

bign8
Copy link
Owner

@bign8 bign8 commented May 22, 2021

The NUM Community has officially released the Unpacker specification! This PR adds the ability to unpack JSON objects using Transforms, Substitutions and Variadic Indexes.

This implementation has a few changes that are not consistent with unpacker.uk/playground's interactions.

  1. (resolved) null + assignKeys and replacePair [slack]
  2. 0 + false resolving as null and {} being resolved as [object Object] [slack]
  3. %var%%%%var% not resolving as var%var [slack]

bign8 added 13 commits May 24, 2021 00:54
Go does not have a way to detect if a key is present but assigned null.
To work around this, <field>Null booleans were added to `Transforms`.
Custom serialization logic that uses a generic `map[string]interface{}`
then sets these feilds appropriately using `v, ok := map[key]`.
Note: Supplementary-2 and 3 needed manual updating to match my expectations.
Still waiting discussion in the NumTechnology Slack, but just getting things moving for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant