infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
JSON Question
Jeff Anderson
Is there a way to get the JSON node information so you can use it in an Xlate. For example if I have a JSON
"address" : {
"type" : "object",
"properties" : {
"line" : {
"type" : "string"
},
"line2" : {
"type" : "null"
},
"city" : {
"type" : "string"
},
"state" : {
"type" : "string"
},
"zip" : {
"type" : "string"
},
"county" : {
"type" : "string"
}
}
Is there a way to get to iterate through "address" and get the values and the identifying text? Address is simple of course, but I have a client that is sending long strings in another field with punctuation that is hard to parse.
What I want it to be able to iterate through "address", pull the fields names and values and put them in OBX segments. I don't think this is possible, but if I don't ask I'll never find out for sure.
Jeff
Find more posts tagged with
Clovertech
Comments
Tipu Razaq (Clovertech)
I keep getting an error when trying to reply "ERROR: Your reply cannot be created at this time"
Tipu Razaq (Clovertech)
Here's what the manual says:
• F
or ITERATE, Cloverleaf only supports the ITERATE action on an array node. In this case, the Basis should be an array node. There is no difference between field, group, and segment under Type. You can select any of these types and use the variable in the address.
You can iterate as long as it's an array node you're iterating over. Your schema doesn't have any arrays that I can see. Your best bet may be to use a TCL proc and look into the JSON extension packages, although they're not the best. Python would be better if you can use that since it supports JSON better.
Jim Kosloskey
So - full disclosure - I have never done a JSON Xlate.
But can you specify the field as repeating in the JSON Configurator much like HL/7? I assume there is a JSON Configurator. If not and it is like XML, you then should be able to change the JSON Schema via available JSON tools (possibly free) shouldn't you?
Again the above offered with a significant dose of ignorance.
Jeff Anderson
I ended up putting in a pre-proc to pull the information. Like Tipu wrote, the element has to be an array. I don't control the format so... It would be nice if you could iterate on an object and pull the json element values. The example didn't show it, but what I was dealing with were AOE questions. So it would be nice to get the AOE and answer without having to hard code the AOE. Anyway, thanks for the responses!
Jeff