a week ago
Hello,
Why emc_query return type is a java format? It may look you manage it like a dict, but it isn't, it isn't anything like json nor a string that you can convert using json.loads.
Trying to iterate sitetree, is way more complex and checks like isinstance(node, ,dict) are impossible.
I think the return from emc_nbi.query should be a json or a plain string that can be parsed as a json.
Site engine 24.10
Monday
Works for me; forgot to add you would need this also:
from java.util import LinkedHashMap
a week ago
Thank you Ludo!
Actually the line you suggest is not working either, but reminding me it's jython, not python was key, I ended up using native java classes and saving me all the code to format in json the hashmap..
Thank you!
a week ago
Try this
isinstance(value, (dict, LinkedHashMap)): # XMC Python is Jython where a dict is in fact a java.util.LinkedHashMap