Previous patch added condition which caused that name of every top level
JSON element was printed also with module name prefix.
It caused that some test failing.
Purpose of this patch is revert this change.
Change-Id: I3c6a992048e76fe0fa5ad0369c474710999502d4
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
// Prepend module name if namespaces do not match
final URI ns = qname.getNamespace();
- if (!ns.equals(getNamespace()) || this instanceof JSONStreamWriterRootContext) {
+ if (!ns.equals(getNamespace())) {
final Module module = schema.findModuleByNamespaceAndRevision(ns, null);
Preconditions.checkArgument(module != null, "Could not find module for namespace {}", ns);