That depends. You can very easily insert the JSON or CSV data as a string into a varchar or text datatype on the database, no problem.
However, if you need the JSON or CSV to be in an array (like a query object) so that it can be inserted into the database, then how the data was "flattened" would matter.
I avoid CSV, if at all possible. Never liked it.
PS: I just noticed that you addressed your post to "ColdFusion Team". Just to make sure, the people at Adobe don't officially monitor these forums - these forums are primarily a user-to-user interaction. Although sometimes Adobe staff do check in here to see what's going on.
*Could you please send me the total script code to load data from json/csv
file to oracle database using cold fusion scripts*
*Hope you do well reply me please ASAP *
Thanks in advanceOn Wednesday, March 16, 2016, WolfShade <
As much as I'd like to assist you, this is not a "write my code for me" kind of forum. If you have specific questions, or have tried something and it isn't working, people will generally try to offer assistance. But asking someone to write code for you is an unreasonable expectation.
Even if you provided the structure of your json/csv data and the exact schema of the database table(s) in Oracle that you wish to write to, you should not expect forum members to provide you "the total script code to load data from json/csv file to oracle database".
And, as WolfShade stated, very few Adobe ColdFusion developer team actively follow these forums - they are intended to provide peer-to-peer support. Furthermore, most of the ColdFusion development team do not routinely write ColdFusion code and would be unlikely to be able to write this code for you.
-Carl V. - Moderator
Can you provide the sample code or related links it I'll very helpful to me
Thanks in advance
Here is the documentation for SerializeJSON. I think in your case, the only argument you will need to use is the var (object to convert to JSON.)
Here is the documentation for DeserializeJSON. If you want to use SerializeJSON to convert a query into a string and want to convert it back to a query, you should use the var and strictMapping arguments in DeserializeJSON (set strictMapping to false.)
You can SerializeJSON a query object, save it to a string, and output it. This will let you see the format that SerializeJSON creates. It's like: