You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the changes made to the processAttributesAndNamespaces(Node n, JSONObject object) method in the MappedNamespaceConvention.java source back in the 2.0 release, no longer processes no prefix attributes correctly. In the 1.0 release, the following JSON:
It no longer does that, starting with the 2.0 release. One possible fix is to add:
if (o instanceof String) {
String uri = o.toString();
QName name = new QName( XMLConstants.DEFAULT_NS_PREFIX, k );
n.setAttribute(name, uri);
}
after the following if statement:
if ( o instanceof JSONObject ) {
JSONObject jo = (JSONObject) o;
for (Iterator<?> pitr = jo.keys(); pitr.hasNext();) {
// set namespace if one is specified on this attribute.
String prefix = (String) pitr.next();
String uri = jo.getString( prefix );
// if ( prefix.equals( "$" ) ) {
// prefix = "";
// }
n.setNamespace( prefix, uri );
}
}
The text was updated successfully, but these errors were encountered:
It looks like the changes made to the processAttributesAndNamespaces(Node n, JSONObject object) method in the MappedNamespaceConvention.java source back in the 2.0 release, no longer processes no prefix attributes correctly. In the 1.0 release, the following JSON:
{ "toy": { "@xmlns": "http://examples.com" }}
Produced the following XML, when converted:
<toy xmlns="http://examples.com"/>
It no longer does that, starting with the 2.0 release. One possible fix is to add:
after the following if statement:
The text was updated successfully, but these errors were encountered: