Write HTML string in JSON

前端 未结 11 1417
小蘑菇
小蘑菇 2020-12-09 08:25

Is it possible to write an HTML string inside JSON?

Which I want to write like below in my JSON file:

[
    {
        \"id\": \"services.html\",
             


        
11条回答
  •  [愿得一人]
    2020-12-09 09:04

    It is possible to write an HTML string in JSON. You just need to escape your double-quotes.

    [
        {
            "id": "services.html",
            "img": "img/SolutionInnerbananer.jpg",
            "html": "AboutUsCSMTechnologiesisapioneerinprovidingconsulting,
            developingandsupportingcomplexITsolutions.Touchingmillionsoflivesworldwidebybringingininnovativetechnology,
            CSMforayedintotheuntappedmarketslikee-GovernanceinIndiaandAfricancontinent.

    " } ]

提交回复
热议问题