xmljson icon indicating copy to clipboard operation
xmljson copied to clipboard

Arrangement of children not preserved

Open roniemartinez opened this issue 5 years ago • 3 comments

How do you preserve the arrangement of children with same name?

XML To JSON: Code:

dumps(badgerfish.data(eTree.fromstring('<alice><david>edgar</david><bob>charlie</bob><david>edgar</david></alice>')))

Output:

{"alice": {"david": [{"$": "edgar"}, {"$": "edgar"}], "bob": {"$": "charlie"}}}

Back to XML: Code:

eTree.tostring(badgerfish.etree(loads({"alice": {"david": [{"$": "edgar"}, {"$": "edgar"}], "bob": {"$": "charlie"}}}))[0]).decode('utf-8')

Output:

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

roniemartinez avatar Mar 11 '20 13:03 roniemartinez

This question is about six months old and has zero reply. Is the author of this project still responding to issues, or do we have to consider this project abandoned?

chrisinmtown avatar Sep 01 '20 14:09 chrisinmtown

My apologies. I have not had a chance to look at the issues most of this year, and I believe that will continue until November.

Thanks for prompting me to clarify, @chrisinmtown

sanand0 avatar Sep 01 '20 14:09 sanand0

Thanks @sanand0 for the quick reply, I hear you saying that we cannot expect any changes in the near future.

chrisinmtown avatar Sep 01 '20 20:09 chrisinmtown