How would I express XML tag attributes in JSON?

后端 未结 13 2189
遥遥无期
遥遥无期 2020-12-07 20:35

I am designing an API for my webapp.

I was thinking to support only JSON responses (not XML) because more streamlined.

But I have just bumped to this XML:

13条回答
  •  死守一世寂寞
    2020-12-07 21:40

    Excluding the attribute names that are always same length, JSON will be always more compact as just does not have closing tags ;)

提交回复
热议问题