highsource / jsonix

Powerful XML<->JSON JavaScript mapping library.
BSD 2-Clause "Simplified" License
361 stars 78 forks source link

missing properties #217

Open joneldiablo opened 5 years ago

joneldiablo commented 5 years ago

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

joneldiablo commented 5 years ago

this is the schema http://service.ddex.net/xml/ern/341/release-notification.xsd