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
JSON data valid against example schema 1:
[{"foo":"bar"}, {"foo":"bar"}, {"foo":"bar"}]
Expected behaviour:
One pojo should be generated. The root construct will be represented in Java by a simple collection (e.g. java.util.List), and the elements of that collection will be instances of the generated pojo.
Original author: joelittl...@gmail.com (January 07, 2011 10:16:15)
Currently jsonschema2pojo can't deal with schemas that contain a simple type (e.g. string, integer, array, etc) as their root element.
Example schema 1:
{
"type" : "string"
}
JSON data valid against example schema 1:
"abc"
Expected jsonschema2pojo behaviour:
No pojos should be generated. JSON content will be unmarshalled into java.lang.String.
Example schema 2:
{
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"foo" : {
"type" : "string"
}
}
}
}
JSON data valid against example schema 1:
[{"foo":"bar"}, {"foo":"bar"}, {"foo":"bar"}]
Expected behaviour:
One pojo should be generated. The root construct will be represented in Java by a simple collection (e.g. java.util.List), and the elements of that collection will be instances of the generated pojo.
Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=8
The text was updated successfully, but these errors were encountered: