Converting XML to JSON using Python?

xmltodict (full disclosure: I wrote it) can help you convert your XML to a dict+list+string structure, following this “standard”. It is Expat-based, so it’s very fast and doesn’t need to load the whole XML tree in memory. Once you have that data structure, you can serialize it to JSON: import xmltodict, json o = xmltodict.parse(‘<e> … Read more

Validation Error: Value is not valid

Validation fails with the message “form:location: Validation Error: Value is not valid” This error boils down to that the selected item does not match any of the available select item values specified by any nested <f:selectItem(s)> tag during processing of the form submit request. As part of safeguard against tampered/hacked requests, JSF will reiterate over … Read more

Conversion Error setting value for ‘null Converter’ – Why do I need a Converter in JSF?

Introduction JSF generates HTML. HTML is in Java terms basically one large String. To represent Java objects in HTML, they have to be converted to String. Also, when a HTML form is submitted, the submitted values are treated as String in the HTTP request parameters. Under the covers, JSF extracts them from the HttpServletRequest#getParameter() which … Read more