Hi all,
In my code, am using I read the contents from a yaml file into a string and load it to the class (X) using the method loadAs(String, Class). I have a requirement where when loading the values from the yaml file to the Object X, if a value in the file is a constant, i.e., say it is $default, then it should be replaced using the default value defined for the Object X.
For example:
Object X:
Yaml file:
Here after loading the yaml file to Object X, id should be contain the value A0001 instead of $default and name should be sample.
Is there a way to do this using yaml methods or should I check each value after loading it to the object and replace it?
Regards,
Niranjan