@rob_m_esriuk It should b doable with the JSONFlattener or JSONFragmenter. If you can attach a small example of the JSON, and part of the workspace where your reading the JSON as a file, then someone in the community might be able to chip in from there.
@markatsafe, I'm sure it is doable, but really can't get the same result. I've obfuscated a bit of JSON (it's for a customer so I'm not sure I can just share it and the structure looks like this
{
"version" : "#.##",
"timeZone" : "0.0",
"timeSeries" : [ {
"header" : {
"type" : "?????????",
"locationId" : "????????",
"parameterId" : "????????????",
"ensembleId" : "??????",
"ensembleMemberIndex" : "?",
"timeStep" : {
"unit" : "second",
"multiplier" : "???"
},
"startDate" : {
"date" : "????-??-??",
"time" : "??:??:??"
},
"endDate" : {
"date" : "????-??-??",
"time" : "??:??:??"
},
"missVal" : "?????",
"stationName" : "????????????",
"lat" : "??.?????????????",
"lon" : "??.?????????????",
"x" : "??????",
"y" : "??????",
"z" : "????",
"units" : "m"
}
},
"events" : [ {
"date" : "????-??-??",
"time" : "??:??:??",
"value" : "?????",
"flag" : "?"
},"events" : [ {
"date" : "????-??-??",
"time" : "??:??:??",
"value" : "?????",
"flag" : "?"
},"events" : [ {
"date" : "????-??-??",
"time" : "??:??:??",
"value" : "?????",
"flag" : "?"
},"events" : [ {
"date" : "????-??-??",
"time" : "??:??:??",
"value" : "?????",
"flag" : "?"
},"events" : [ {
"date" : "????-??-??",
"time" : "??:??:??",
"value" : "?????",
"flag" : "?"
},
and when I run it through the JSON reader it instantly interprets the timeSeries as shown in the attached image. I've tried the Json fragmenter (picture) and then used the attribute exposer, importing the time series as described by @deanatsafe but when I run the subsequent list exploder appears to have trouble with finding the list.
Why not just write the json (FeatureWriter) you read from the database to a temp file (TempPathnameCreator) and read the file like you are used to? (FeatureReader)
Why not just write the json (FeatureWriter) you read from the database to a temp file (TempPathnameCreator) and read the file like you are used to? (FeatureReader)
This has occurred to me - and I guess may be the end result, it just seemed a bit clunky, however it now appears that I need to get a list of locations in the json to predicate a reader so it may be the way that I have to go to pre-write and pre-process the Json