You have to define all the fields that you receive. IWS currently doesn't allow you to ignore undefined properties.
I've had no issues with defining nested data structures to handle all my fields / arrays; granted I'm not in the hundreds as we try to make it lean.
I'm not sure of the limits of the number of fields.
You may want to put this in the WEB400 list.
Mitch
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryant, Troy
Sent: Tuesday, June 27, 2017 7:12 PM
To: midrange-l@xxxxxxxxxxxx
Subject: [Caution: Message contains Redirect URL Content] JSON Limitations using IWS
I have created a RESTful web service using the IWS wizard with JSON as an input parameter.
It works fine when the JSON is small as in the example provided here:
https://www.ibm.com/developerworks/ibmi/library/i-rest-web-services-server3/
However, I need to accept a larger file with hundreds of JSON field names and it fails because all the fields are not declared in my RPG program data structure.
This is the error - org.codehaus.jackson.map.exc.UnrecognizedPropertyException
Is it possible to set something like this?: @JsonIgnoreProperties(ignoreUnknown = true) as described here:
https://stackoverflow.com/questions/4486787/jackson-with-json-unrecognized-field-not-marked-as-ignorable/7546047#7546047 , or do I need to declare every field name?
Is there a limit on the number of field names that IWS will allow for a JSON file?
Cheers, Troy.
This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ Bank New Zealand Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.