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

Null handling #1

Open
erndob opened this issue Feb 26, 2019 · 1 comment
Open

Null handling #1

erndob opened this issue Feb 26, 2019 · 1 comment

Comments

@erndob
Copy link

erndob commented Feb 26, 2019

I'm trying to test the yarm-cli and I'm observing some breaking changes that happen when you convert json->yaml->json.

json, when having schema type set as nullable string:

"type": [
       "string",
       "null"
    ]

yaml:

  type:
  - string
  - null

json:

  "type": [
    "string",
    null
  ]

The null string is parsed back as just a null, instead of a string. This makes it impossible to use. Any workarounds?

I tried having null as 'null' and "null" in yaml, but it always gets converted to a null. Really need to have it as a string.

@justinyoo
Copy link
Contributor

justinyoo commented Feb 27, 2019 via email

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

No branches or pull requests

2 participants