Ian M
9/30/24, 12:54:47 PM EDT
Corrected JSON : {
"inputdata": {
"metadata": {
"keywords": [
"Italion"
],
"primarymedia": "AZI-yKfVX_CelzxqHwdr",
"searchcategory": null,
"entity_date": "Sat Sep 28 00:00:00 CST 2024",
"name": "Grandmas Recipes",
"longcaption": "Fun Style for kids"
},
"directions": "Pizza Recipies"
}
}
Christopher B
9/30/24, 1:05:35 PM EDT
Ian M
9/30/24, 1:05:52 PM EDT
I'm watching the logs if you want to try again, so far I've just seen invalid json come in
Christopher B
9/30/24, 1:08:02 PM EDT
I sent another. I validated the json {"inputdata":{"metadata":{"keywords":["Italion"],"primarymedia":"AZI-yKfVX_CelzxqHwdr","entity_date":"2024-09-28T06:00:00.000Z","name":"Grandmas Recipes","longcaption":"Fun Style for kids"},"directions":"Pizza Recipe "}}
Ian M
9/30/24, 1:57:21 PM EDT
if( value == null && getVariables().containsKey("_jsonRequest"))
{
Object vals = getJsonRequest().get(inKey);
if (vals instanceof Collection )
{
Collection array = (Collection)vals;
if( array.size() > 0)
{
value = (String)array.iterator().next();
}
}
else
{
value = (String)vals;
}
}
Ian M
9/30/24, 1:57:55 PM EDT
It should be handled in here, we only handle collections and strings but it could be an object . i will fix it here and return the object as a string.
Ian M
9/30/24, 2:03:53 PM EDT
bin/dita -i ../90130_SPC_C-EFM/DITA-OUTPUT/90130_SPC_C-EFM/90130_SPC_C-EFM.ditamap -o out -f pdf