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

XML to Jason conversion using XSD does not take care of Boolean value #1

Open
waterbender2009 opened this issue Oct 18, 2017 · 2 comments

Comments

@waterbender2009
Copy link

XML to Jason conversion using XSD does not take care of Boolean value . I have the attached xml and xsd and the output json file
sample.zip

@waterbender2009
Copy link
Author

Well Added the following code to Translator.java :
else if(lDecl.getTypeDefinition().derivedFrom("http://www.w3.org/2001/XMLSchema", "boolean", (short)-1))
{
boolean valueToUse =false;
if(lValue.equalsIgnoreCase("true") )
valueToUse=true;
lret = JsonBool.create(valueToUse);
}
and fixed the issue . code can be cleaned up.

@kw217
Copy link
Owner

kw217 commented Nov 6, 2017

Thanks @waterbender2009 - I'm happy to take a pull request...

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