English 中文(简体)
JSON在不增加关键词的引语
原标题:JSON to String without adding quotes to keys

我正在建造一个网络应用程序(使用Javascript/jQuery),生成JSON配置文件。

最终,这些应用应当将生成的JSON转换成一种扼杀,以便用户能够加以复制?

目前,我正在做一个简单的<代码>JSON.stringification(),但这增加了对关键和价值观的引述。 为了获得配置文件以开展工作,关键产品必须在没有报价的情况下出口(无说明)。

例如,id”:“ezdzdz”>应改为id:“ezdz”,除非其实际写成“id”在JSON。

感谢一切帮助!

问题回答

如果它带有JSON,而不是本地的Javascript,那么你就必须引用关键的名字。

。 纽约总部 Spec - 钥匙是否必须用报价加以四舍五入?





相关问题
JQuery/MVC Search Issue

I have inherited a piece of work where the entry screen shows a summary of 20 calculated variables. E.g. Var A (250), Var B (79). Clicking on any of these links takes the user to a view with a ...

jQuery quicksearch plug-in tinkering with JSON

I ve implemented the quicksearch plugin by Rik Lomas and I love it for an application in a custom CMS I m building. I was wondering though, since I m going to have a bizillion items in the table if ...

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

PHP json_decode question

i m trying to use json_decode to combine a few json objects and then re-encode it. my json looks like: { "core": { "segment": [ { "id": 7, "...

Converting JSON data to Java object

I want to be able to access properties from a JSON string within my Java action method. The string is available by simply saying myJsonString = object.getJson(). Below is an example of what the string ...

热门标签