Hello:
I have an issue that I can't seem to understand. I'm new to JSON (in fact this is the first json output I've ever created). I have a structure that has a ROOT and SUB. The JSONTemplater says my current structure is valid and produces the file. However, when I run it through https://jsonlint.com/ the results are invalid. So, I looked at the output of what another area is expecting and I manually modified the file to see if the updates I made were valid. The short of it is, I need to modify what's in my JSONTemplater to add a comma (,) before each NEW record and add brackets ([ ]) around the entire output file. EVERY attempt I've made in modify the JSONTemplater has failed or I get an error. I'm loosing it! :) I've attached the file I manually revised and the one from the actual results of the workspace.
Can someone tell me what's wrong with my JSONTemplater?
ROOT Structure:
{
"totalInvestment": xs:double(fme:get-attribute("totalInvestment")),
"squareFootageRetail": xs:double(fme:get-attribute("squareFootageRetail")),
"squareFootageOffice": xs:double(fme:get-attribute("squareFootageOffice")),
"squareFootageManufacturing": xs:double(fme:get-attribute("squareFootageManufacturing")),
"recordType": fme:get-attribute("recordType"),
"projectStage": fme:get-attribute("projectStage"),
"projectName": fme:get-attribute("projectName"),
"projectId": fme:get-attribute("projectId"),
"projectDescription": fme:get-attribute("projectDescription"),
"projectDate": fme:get-attribute("projectDate"),
"propertyAddresses":
[
{ fme:process-features("SUB") }
],
"programType": fme:get-attribute("programType"),
"numberOfUnits": xs:double(fme:get-attribute("numberOfUnits")),
"numberOfSqFt": xs:double(fme:get-attribute("numberOfSqFt")),
"numberOfParkingSpaces": xs:double(fme:get-attribute("numberOfParkingSpaces")),
"numberOfHotelRooms": xs:double(fme:get-attribute("numberOfHotelRooms")),
"neighborhood": fme:get-attribute("neighborhood"),
"jobsRetained": xs:double(fme:get-attribute("jobsRetained")),
"jobsCreated": xs:double(fme:get-attribute("jobsCreated")),
"developer": fme:get-attribute("developer"),
"category": fme:get-attribute("category"),
"cagisId": fme:get-attribute("cagisId"),
"address": fme:get-attribute("address")
}
SUB Structure:
{
"street": fme:get-attribute("street"),
"cagisId": fme:get-attribute("cagisId"),
"addressId": fme:get-attribute("addressId")
}