SharpYaml icon indicating copy to clipboard operation
SharpYaml copied to clipboard

Can you get a node by using a string path somehow?

Open KarlOfDuty opened this issue 5 years ago • 3 comments

Such as "category.object.parameter" retrieving the node at

category:
    object:
        parameter: "hello"

In all other YAML libraries I've used in other languages one can get a node by simply entering the path to it as a string in a get function, is there a feature like that here?

KarlOfDuty avatar Aug 01 '18 10:08 KarlOfDuty

In all other YAML libraries I've used in other languages one can get a node by simply entering the path to it as a string in a get function

Could you name these libraries? I am looking for this feature specifically

JimmyCushnie avatar Sep 13 '18 16:09 JimmyCushnie

I've only used the one included with spigot in java and yaml-cpp in C++.

KarlOfDuty avatar Sep 13 '18 17:09 KarlOfDuty

I've solved this issue in a pretty janky way with C# here if you are interested: https://stackoverflow.com/questions/51630430/getting-a-yamldotnet-sharpyaml-node-using-a-string-path-such-as-category-objec

KarlOfDuty avatar Sep 13 '18 17:09 KarlOfDuty