I am trying to call an API from R programming and i got successful in GET method but when i am reading an excel file and converting it into JSON i am getting error.
Please find the code below:
JSON should look like this :
{
"internalId": "Asset Name",
"description": {
"short": "Asset Type",
"long": "Asset Type"
},
"dataType": "numeric",
"optionCode": "1",
"dimension1": null,
"dimension2": null,
}
But after conversion it looks like :
[
{
"internalId": "RAttribute",
"description.language": "en",
"description.short": "R Attribute",
"dataType": "string",
"optionCode": 3
}
]
Dataset from where i am loading : Dataset
Code for loading the dataset :
jsonAttributes <- jsonlite::toJSON(Attributes,pretty=TRUE)
print(jsonAttributes)
Please help here.... let me know if any other information is required.