Version 2.3.8
Release notes
- Fixed a problem with
minOccurs
/maxOccurs
generation (#62) - Corrected generation of simple/builtin types (#60)
All issues, fixed in this release
Backwards compatibility
With the fix for #60, Jsonix Schema Compiler now does a better job recognizing XML Schema built-in datatypes. For instance, you will now get types like UnsignedByte
XML Schema xs:unsignedByte
etc.
This means however, that with this release Jsonix Schema Compiler will generate different types compared to previous releases. This may break backwards compatibility.
Below is the list of affected types:
xs:anySimpleType
->AnySimpleType
(previouslyAnyType
)xs:hexBinary
->HexBinary
(previouslyString
)xs:dateTime
->DateTime
(previouslyCalendar
)xs:date
->Date
(previouslyCalendar
)xs:time
->Time
(previouslyCalendar
)xs:gYearMonth
->GYearMonth
(previouslyCalendar
)xs:gYear
->GYear
(previouslyCalendar
)xs:gMonthDay
->GMonthDay
(previouslyCalendar
)xs:gDay
->GDay
(previouslyCalendar
)xs:gMonth
->GMonth
(previouslyCalendar
)xs:unsignedLong
->UnsignedLong
(previouslyInteger
)xs:unsignedInt
->UnsignedInt
(previouslyLong
)xs:unsignedShort
->UnsignedShort
(previouslyInt
)xs:unsignedByte
->UnsignedByte
(previouslyShort
)xs:nonNegativeInteger
->NonNegativeInteger
(previouslyInteger
)xs:nonPositiveInteger
->NonPositiveInteger
(previouslyInteger
)xs:positiveInteger
->PositiveInteger
(previouslyInteger
)xs:negativeInteger
->NegativeInteger
(previouslyInteger
)xs:anyURI
->AnyURI
(previouslyString
)xs:normalizedString
->NormalizedString
(previouslyString
)xs:token
->Token
(previouslyString
)xs:language
->Language
(previouslyString
)xs:Name
->Name
(previouslyString
)xs:NCName
->NCName
(previouslyString
)xs:NMTOKEN
->NMTOKEN
(previouslyString
)xs:NMTOKENS
-> list ofNMTOKEN
(previously list ofString
)
Most of these changes are not dangerous as both old and new type are represented by the same JSON type. For instance, xs:Name
was previously generated as String
and now as Name
- in both cases JSON type for this is string
.
However there are three types where these changes are dangerous:
xs:dateTime
->DateTime
(previouslyCalendar
)xs:date
->Date
(previouslyCalendar
)xs:time
->Time
(previouslyCalendar
)
Former mapping was using the Calendar
type which maps date/time values as a JSON structure. New mappings are using DateTime
, Date
and Time
types. The problem is that with Jsonix versions up to 2.3.2
these types map date/time values as JavaScript Date
object which is not compatible with the JSON structure mapped by Calendar
.
This will be corrected in the next version of Jsonix. So if you upgrade to this release of the Jsonix Schema Compiler, you should also upgrade to Jsonix 2.4.0
.