开发者

xml<-->json converter which preserves types

I need an xml<-->json converter which preserves types. For example:

json:

"number": 1

to xml:

<number>1</number>

back to json:

"number": 1

the converters I've found so far will return back to json like this:

"number": "1"

(a string semantics and not int)

Of course I understand the semantics is lost in the translation. I wonder if any converter tried to preserve the type on the xml like this:

<n开发者_JAVA百科umber xsi:type="s:int">1</number>

or to use xml schema etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜