Wednesday, 3 May 2017

How to write pretty a json value?

I have a json file looks like:

{
    "content": "A long long string<div>which can contains html tags</div> but it is very very long and i want to format as prretty as i can..... "
}

In this json the content will be very very long and i would like to format it for example:

{
    "content": "aaaaaaaa
                aaaaaaaa
                aaaaaaaa" 
}

So just write it to the file...later i will read it and replace to the original to this one..Is there any way to do this?



via kodaek99

No comments:

Post a Comment