tillurdizzy / x2js

Automatically exported from code.google.com/p/x2js
0 stars 0 forks source link

Request: Ignoring invalid XML element names from object properties #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Let's say we have an object:

{
  $$hashKey: 3,
  element1: "something",
  element2: "something else"
}

Then, when we pump this through `x2js.json2xml_str()`, it will fail. The 
`$$hashKey` is an invalid name.

It would be nice to configure this to either fail or ignore those pesty 
properties... or have a service to strip out invalid properties.

Would this idea be something you'd consider?

Original issue reported on code.google.com by johngeor...@gmail.com on 27 Jan 2015 at 7:43

GoogleCodeExporter commented 9 years ago
Bump.

I'm happy to attempt the approach as long as you're interested in the idea.

Original comment by johngeor...@gmail.com on 2 Feb 2015 at 9:30