Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About Same level same name become array elements Problems #16

Open
ecoccw opened this issue Nov 28, 2018 · 1 comment
Open

About Same level same name become array elements Problems #16

ecoccw opened this issue Nov 28, 2018 · 1 comment

Comments

@ecoccw
Copy link

ecoccw commented Nov 28, 2018

Dear,

<alice><bob>charlie</bob><bob>david</bob></alice>

becomes
{ "alice": { "bob": [ "charlie", "david" ] } }

But When I Use like:
<alice><bob>charlie</bob><a>test</a><bob>david</bob></alice>

Why can becomes
{ "alice": { "bob": [ "charlie", "david" ]
,"a": "test" }}

I Get
{ "alice": { "bob": "charlie"
, "a": "test"
, "bob": "david" } }

Please Help.

@javadev
Copy link

javadev commented Jul 2, 2021

It may be converted to this JSON

{
  "alice": {
    "bob": [
      "charlie",
      {
        "#item": {
          "a": "test"
        }
      },
      "david"
    ]
  },
  "#omit-xml-declaration": "yes"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants