Jump to content

REST API using numbers as the element names

Nicole Gallacher

Recommended Posts

The API I am consuming returns the below JSON data with numbers as the element names. I tried to create a schema file using the New>XML Schema File From JSON Payload option in BW Studio, but I am getting these errors on the Schema file that was generated "s4s-att-invalid-value: Invalid attribute value for 'name' in element 'element'. Recorded reason: cvc-datatype-valid.1.2.1: '9' is not a valid value for 'NCName'." What can I do to make this JSON response usable

{"data":[{"13":{"value":"125779596400"},"14":{"value":23308.0},"6":{"value":"12577956400"},"7":{"value":""},"8":{"value":"Delivered"},"9":{"value":""}},{"13":{"value":"12577900061"},"14":{"value":232261528.0},"6":{"value":"12577960061"},"7":{"value":""},"8":{"value":"Delivered"},"9":{"value":""}},{"13":{"value":"1257795600"},"14":{"value":23308.0},"6":{"value":"12577996400"},"7":{"value":""},"8":{"value":"Delivered"},"9":{"value":""}}],"fields":[{"id":6,"label":"Tracking Number","type":"text"},{"id":7,"label":"Ship date","type":"date"},{"id":8,"label":"Status","type":"text"},{"id":9,"label":"Most recent sync date","type":"timestamp"},{"id":13,"label":"FedEx Tracking ID","type":"text"},{"id":14,"label":"Daily Pilot Log - Drive IDs","type":"float"}],"metadata":{"numFields":6,"numRecords":3,"skip":0,"totalRecords":3}}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...