mardi 11 février 2020

Parsing Objects in YAML with changing names [closed]

I'm trying to parse a YAML file with snakeYAML but some of the objects, although the same type have different names which cause issues if they're not the same name as the variable of the class you're loading them into because of Java reflection. How do you work around this? Below is an example of the data I would need to parse where "layer" is the same type of object but have different names.

counter: 37245
layer0:
  openCost: 1900
  level: 1
layer1:
  openCost: 540
  level: 4
layer4:
  openCost: 4400
  level: 6
version: Release 6b




Aucun commentaire:

Enregistrer un commentaire