ifm / ifm3d

Library and Utilities for working with ifm pmd-based 3D ToF Cameras
https://api.ifm3d.com
Apache License 2.0
106 stars 69 forks source link

o3r->Get() with specific path #423

Closed REB427 closed 9 months ago

REB427 commented 9 months ago

o3R->Set(someJson) works fine for partial configurations but Get-function gives an error:

std::vector<std::string> path = {"ports", "port0"}; auto state = o3R->Get(path); throws: Unknown error 104012: JSON Path not valid I have a head connected at port 0, ifm3d 1.4.3, firmware 1.0.14

lola-masson commented 9 months ago

Hi @REB427,

"port0" alone is not a valid path, because you need to provide the whole path from the parent in the json: to get port0, you would request {"/ports/port0"}

REB427 commented 9 months ago

so vector is for different sections in the json and not for the json path. Ok got it, thanks