Fields on Object with numeric properties returns empty array
I am trying to store data in my registers using jsonDecode/jsonEncode. Once I decode my object I want to convert it to a Map by iterating over the object's keys. The only way I can see to do this is to use object.class.fields... but this seems to filter out numeric keys and the result is an empty array ([]). My object is keyed by weapon and chip ID, which are numeric. Is there an alternate way to get the list of keys in an object?
This is the data format I am using:
A-ha! It is undocumented but from reading the code and testing it it's clear that object.keys() does what I want, I found it here:
https://github.com/leek-wars/leekscript/blob/f0c085341338b06913df8cfa4ab9bb51602ef569/src/main/java/leekscript/common/ObjectType.java#L11-L13