English 中文(简体)
JSON 展示出一种树种结构的 format版
原标题:JSON string out of formatted Javascript string to represent a tree structure

我有一份 j印,代表一个树木结构,即<>>。

我希望能代表上述树木。 (关键可能与价值相同)。 我想为任何几个节点和次点进行方案转变。

我想知道,我是否可以再使用一些法典。

问题回答

消极的答案总是模糊的,但如果你重新寻找将改变这种扼杀的原有守则。

 [a[b,c]d[e]] 

页: 1

 {"a": ["b", "c"], "d": ["e"]} 

或这种扼杀(我可以说什么)

 {"a": {"b": "b", "c": "c"}, "d": {"e": "e"}} 

或类似,我认为答案是没有的,你不得不写上转换日。 t不易,甚至不需要使用reg,除非可能与识别器相匹配。

您要么可以直截了当地转换(看上去比较容易),要么可以把你的标记变成一个物体,然后使用<条码>,从nofollow”json2.js ,或类似于把它变成一名JSON string。 后一种方法的好处是,你不必担心做必要的价值观放弃,因为它成为更严重的问题。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签