Answer the question
In order to leave comments, you need to log in
How to store code snippets [HTML, CSS, Javascript] in JSON?
In general, this is the question. Not how to parse HTML\JSON
There is a need to store small code snippets of examples. IMHO they would look good in JSON. It is desirable that after storage the appearance (indents, etc. be preserved.) It is also ideal that human intelligibility is preserved during storage, but this is not necessary ... An entire HTML page can also act as a fragment, only VERY small.
On the one hand, itching to write a bicycle, on the other hand, there are most likely standard methods for storing such ...
Answer the question
In order to leave comments, you need to log in
add backslashes before quotes and store, what's in the way?
{
"html" : ""
}
According to the JSON specification, all characters \n\r\t, etc., in values, must be replaced with the corresponding escape sequences
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question