JADE Environment Development Ideas

What's new in the upcoming JADE release?

IMPROVED DEVELOPER EFFICIENCY. ENHANCED SECURITY. SMOOTHER INTEGRATION

The JADE 2022 release meets tomorrow’s business demands.


Start your update to JADE's latest release

Rest API / JSON parser - transform initial uppercase character to lower case

Our client is sending a json payload to our Rest API with elements that start with uppercase characters. But this causes an exception because our proxy request classes properties defined in Jade can only ever start with a lowercase character. We have had to transform the json message in an Azure middleware layer to work around. Could the JSON parser be modified to automatically convert a starting uppercase character to lower case before validating the element against our request properties.

Here is a sample of a payload they send, I have processed this thru a JSON formatter and validator and it says it is valid json.

{

"Stepid": "BasicItem-387882",

"Links": {

"Product_To_BrandHierarchy": "GLITTER G"

},

"Values": {

"AT_ProductKey": "2559293",

"AT_ProductShortName": "B/G SS SOLID 8MM 68MM",

"AT_InStoreStartDate": "19-Feb-2019",

"AT_HighRiskIndicator": "N",

"AT_Character": "BUNNY;CAR;CAT",

"AT_ShippingProductWeight": "0.10 kg"

}

}

  • Julie Harliwich
  • Jan 5 2021
  • Future consideration
  • Attach files
  • Greg Matthews commented
    19 Feb 01:47

    implementing SSO where the SCIM schema defines Operations (capital O), when loading the Operations we end up with no operations, we have defined our schema with a lowercase "o" (we have no choice in that anyway), but can't do anything about the SCIM schema which AAD sends us. We are using APIM to convert it.

  • Julie Harliwich commented
    April 30, 2021 02:16

    Tim, I like your first idea "Provide the ability to have "Web names" on our JADE properties, e.g. by annotations which will allow for mapping of these json properties to our JADE properties"

  • Julie Harliwich commented
    April 30, 2021 02:14

    BeeJay, when we told the client that we needed lowercase, the response was that Jade should be able to handle uppercase because valid json syntax. When it is a clients bespoke Jade system talking to another of their systems, it becomes our problem. So we currently intercepting raw json in processRequest and modifying it before it gets to parser.

  • BeeJay commented
    April 30, 2021 02:07

    I may be missing something, but as the Rest service provider aren't you the one who documents the APIs for your Rest service? As such, the document for the Rest APIs could specify that the property names all need to start with a lower case character, and then it's up to the consumer(s) of your Rest service API to follow the documented requirements?

    Otherwise, isn't this somewhat of a case of the tail wagging the dog having a consumer of your Rest service API dictating what they're going to send through to your Rest service provider and expecting you to adjust your Rest service API to suit them?

  • Tim Aitchison commented
    April 30, 2021 01:16

    Edit to the above: by "uppercase the first letters" I meant "lowercase the first letters" :)
    Or more generally, "make identifiers in the json string which are not valid JADE names into valid JADE names."

  • Tim Aitchison commented
    April 29, 2021 23:56

    I don't think it's viable to simply uppercase the first letters as a general rule, but there's two main ways we could make life easier:

    1. Provide the ability to have "Web names" on our JADE properties, e.g. by annotations which will allow for mapping of these json properties to our JADE properties.

    2. Provide the ability to deserialize json strings to jdos (which helps some other things also)