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

Switch canonical json libraries #247

Merged
merged 1 commit into from
May 25, 2021

Conversation

carolynvs
Copy link
Contributor

The previous library didn't handle numbers as well and this other is endorsed by the canonical json spec.

I am holding off on using the number support until we agree to tweak the spec cnabio/cnab-spec#413

@carolynvs carolynvs force-pushed the swap-canonical-jsons branch 2 times, most recently from f2f94c2 to eb5905c Compare May 6, 2021 21:54
@carolynvs carolynvs marked this pull request as ready for review May 7, 2021 18:40
@carolynvs carolynvs requested review from jlegrone and vdice May 7, 2021 18:40
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (pending consensus on cnabio/cnab-spec#413, which I'm in support of)

carolynvs added a commit to carolynvs/cnab-spec that referenced this pull request May 17, 2021
Revert the changes in cnabio#257 which updated the spec to disallow
non-integer values. We misunderstood the canonical json spec and were
using a library that didn't support numbers.

I have an open PRs for cnab-go which tested out switching to a library
that support numbers in canonical json and it works great.

* cnabio/cnab-go#247
* cnabio/cnab-go#248

So now fields such as default, maximum, minimum, etc can use numbers
again!

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs carolynvs requested a review from radu-matei May 17, 2021 14:18
carolynvs added a commit to cnabio/cnab-spec that referenced this pull request May 24, 2021
* Allow numbers again

Revert the changes in #257 which updated the spec to disallow
non-integer values. We misunderstood the canonical json spec and were
using a library that didn't support numbers.

I have an open PRs for cnab-go which tested out switching to a library
that support numbers in canonical json and it works great.

* cnabio/cnab-go#247
* cnabio/cnab-go#248

So now fields such as default, maximum, minimum, etc can use numbers
again!

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>

* Include integer and number in primitives list

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
The previous library didn't handle numbers as well and this other is
endorsed by the canonical json spec.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs carolynvs merged commit fa2951f into cnabio:main May 25, 2021
@carolynvs carolynvs deleted the swap-canonical-jsons branch May 25, 2021 14:54
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

3 participants