highsource / jsonix

Powerful XML<->JSON JavaScript mapping library.
BSD 2-Clause "Simplified" License
361 stars 79 forks source link

Default Mappings for some simple use cases? #31

Open ghost opened 10 years ago

ghost commented 10 years ago

Some other json/xml libraries have implicit mapping built-in. JSONIX seems to require that I define mappings. This makes JSONIX look more difficult and developers choose the other "easier" libraries that just convert to or from XML (albeit with hardcoded mapping).

It would be great to have (autogenerate?) default mappings for simple use cases. If I just have a flat XML with simple elements/attributes, I would like to be able to marshall/unmarshall it without specifically calling out individual field mappings.

Essentially asking for the ease of use of some other libs without losing the power of JSONIX rich mappings when needed.

highsource commented 10 years ago

Yep, totally agree.

ghost commented 10 years ago

Is this on the roadmap or already in progress? If not, does our benevolent benefactor (you) have bandwidth to tackle it?

highsource commented 10 years ago

I had to lookup "benevolent benefactor" in the dictionary. :)

This is in the roadmap (really have to write one). I've made the first step with the "AnyType" which is somewhat "naive" implementation of the mappinglessness.

No, this is not a work in progress at the moment. I'm currently focusing on one important compiler feature ("Please compile only those things from the schema B which I need for schema A. And, by the way, I don't need A.C.")

Bandwith - generally yes, but this won't be my highest prio at the moment. PRs welcome. :)