coconutelegraph
asked on
JSON Objects in ColdFusion
I have a partner that wants to send my CFC the following Array of Objects using JSON:
[
{
"fullName": "Joe Strummer",
"phoneNumber" : 2028586745,
"city" : "Washington, DC"
},
{
"fullName": "Mick Jones",
"phoneNumber" : 2029768143,
"city" : "Washington, DC"
},
{
"fullName": "Ian MacKaye",
"phoneNumber" : 2022675545,
"city" : "Washington, DC"
}
]
What's the best way to get this data into my database? I've read the following article:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_c-d_43.html#5176845 . It's helpful but it is calling the feed rather than another application calling MY cfc. How do access the data above so I can pass it to the deserializeJSON()?
[
{
"fullName": "Joe Strummer",
"phoneNumber" : 2028586745,
"city" : "Washington, DC"
},
{
"fullName": "Mick Jones",
"phoneNumber" : 2029768143,
"city" : "Washington, DC"
},
{
"fullName": "Ian MacKaye",
"phoneNumber" : 2022675545,
"city" : "Washington, DC"
}
]
What's the best way to get this data into my database? I've read the following article:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_c-d_43.html#5176845 . It's helpful but it is calling the feed rather than another application calling MY cfc. How do access the data above so I can pass it to the deserializeJSON()?
ASKER
leakim971,
Thanks for the link. I'm using mySQL. What I need help with is how to access the JSON data sent to my web service in ColdFusion.
Thanks for the link. I'm using mySQL. What I need help with is how to access the JSON data sent to my web service in ColdFusion.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
You're welcome! Thanks for the points!
For Oracle the following may help : https://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/JSON/A_2715-Import-and-Export-datas-from-JSON-string-to-Oracle-with-Java-Stored-Procedure.html