Hi Telmo,
Please see this line of code, if gives you the exact message for your config:
I do not have a deep knowledge about network configuration in ONOS and the way it is processed. However, checking the files in ONOS repository, I would say that your configuration needs a class with the equivalent keys (as attributes). I know that a common way to process JSON config is to deparse it to a pre-defined class, which allows a more Java-ish way to consult the information. Why deparse a JSON string everytime you want to know something when you can just have a class representing the same content, right?. For example, the "basic": { . . . } part of the configuration is probably assigned to a particular class.
It works (more or less) the following way:
A class associates the word "basic" with the class
BasicDeviceConfig (i.e., registers a ConfigFactory). ONOS core uses this "association" to probably parse until the key "basic" and then deparse the rest of the information to the BasicDeviceConfig class. Now, your "segmentrouting" is a sub-key for the device id, you would need a similar association with the key "segmentrouting" and the proper custom class you created for it.
There must be a class that you can use for that purpose, a class that has the same as keys as attributes. Check the tutorial or app where you saw this process suggested.
Good luck,