jsonix icon indicating copy to clipboard operation
jsonix copied to clipboard

preserving comments when unmarshalling and marshalling

Open coderextreme opened this issue 9 years ago • 3 comments

I'd like my XML comments to be preserved when unmarshalling to JSON and have them back in the same place when I marshall back to XML. Is this possible? Thanks!

coderextreme avatar Oct 29 '15 02:10 coderextreme

At the moment, I don't see a good way to represent comments in models. How would you like to represent them in JSON? Could you give an example?

Am 29.10.2015 um 03:11 schrieb John Carlson [email protected]:

I'd like my XML comments to be preserved when unmarshalling to JSON and have them back in the same place when I marshall back to XML. Is this possible? Thanks!

— Reply to this email directly or view it on GitHub.

highsource avatar Oct 29 '15 07:10 highsource

[{ "": true }, "" ]

I'm not sure what else is possible. How are scripts, stylesheets and text nodes handled? On Oct 29, 2015 2:40 AM, "Alexey Valikov" [email protected] wrote:

At the moment, I don't see a good way to represent comments in models. How would you like to represent them in JSON? Could you give an example?

Am 29.10.2015 um 03:11 schrieb John Carlson [email protected]:

I'd like my XML comments to be preserved when unmarshalling to JSON and have them back in the same place when I marshall back to XML. Is this possible? Thanks!

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/highsource/jsonix/issues/104#issuecomment-152103951.

coderextreme avatar Oct 29 '15 15:10 coderextreme

Or [{"<!--comment1": "comment line 1", "<!--comment2":"comment line 2", ... }, "", ... ] On Oct 29, 2015 10:36 AM, "John Carlson" [email protected] wrote:

[{ "": true }, "" ]

I'm not sure what else is possible. How are scripts, stylesheets and text nodes handled? On Oct 29, 2015 2:40 AM, "Alexey Valikov" [email protected] wrote:

At the moment, I don't see a good way to represent comments in models. How would you like to represent them in JSON? Could you give an example?

Am 29.10.2015 um 03:11 schrieb John Carlson [email protected]:

I'd like my XML comments to be preserved when unmarshalling to JSON and have them back in the same place when I marshall back to XML. Is this possible? Thanks!

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/highsource/jsonix/issues/104#issuecomment-152103951.

coderextreme avatar Oct 29 '15 17:10 coderextreme