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

Allow nullable type (instead of Object) when JSON type is an array with ["string", "null"] #390

Closed
deanmorin opened this issue Jul 14, 2015 · 0 comments
Milestone

Comments

@deanmorin
Copy link

The JSON schema I'm using has a number of fields that are explicitly "nullable" like so:

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

When the POJO is created, this field will be of type Object, intsead of String.

Ideally, if type is an array of size 2, and the second type is null the first type should be used for the POJO.

@joelittlejohn joelittlejohn added this to the 0.4.14 milestone Aug 3, 2015
@joelittlejohn joelittlejohn changed the title POJO type is Object when JSON type is an array with ["string", "null"] Allow nullable type (instead of Object) when JSON type is an array with ["string", "null"] Aug 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants