jsonix
jsonix copied to clipboard
missing properties
Hi again, I have create the jsonix schema with this command:
java -jar jsonix-schema-compiler-full.jar schema.xsd -d jsonSchemas -p ddexV341 -generateJsonSchema
and have this json:
{
"name": {
"namespaceURI": "http://ddex.net/xml/ern/37",
"localPart": "NewReleaseMessage",
"prefix": "ern"
},
"value": {
"resourceList": {
"soundRecording": [{
"soundRecordingDetailsByTerritory": [
{
"technicalSoundRecordingDetails": [
{
"file": [
{
"fileName": "782150651416_1_01.wav",
"filePath": "resources/",
"hashSum": {
"hashSum": "8365682821f1c5553fdf1a1f58b597db",
"hashSumAlgorithmType": "MD5"
}
}
]
}
]
}
]
}]
}
}
}
then
let context = new Jsonix.Context([schema]);
let marshaller = context.createMarshaller();
let xml = marshaller.marshalDocument(data);
the problem is soundRecordingDetailsByTerritory is empty, checking the jsonix schema, the last property is technicalSoundRecordingDetails, but checking the jsonschema generated, soundRecordingDetailsByTerritory hasn't technicalSoundRecordingDetails property
this is the schema http://service.ddex.net/xml/ern/341/release-notification.xsd