Giter Club home page Giter Club logo

Comments (4)

mraineri avatar mraineri commented on August 12, 2024

It does look like you're using this correctly. @pboyd04 any ideas?

from libredfish.

Timboooh avatar Timboooh commented on August 12, 2024

I'm not sure if it ever worked, because I can't find any parsing code for the [parent.child].

In redpath.c:165 the propname just gets set to index. (Status.Health in my example) with the REDPATH_OP_EXISTS operation.
Then later, when this operation gets executed in payload.c this same path string gets used (as nodeName) when jansson is called: value = json_object_get(payload->json, nodeName)
Only this function doesn't support json paths, only json keys.

I have two ideas on how I might be able to fix this:

  1. Add a json_object_get_by_path function and use it in payload.c which would be able to handle these json paths.
  2. Make redpath.c split this [parent.child] into two seperate redpathnodes that get handled separately.

IMHO option 1 is way simpler, and I already have working code that can handle json paths. I think I can implement it in payload.c, without breaking any current functionality. But I would have to test this first.

Let me know what you think about it.

from libredfish.

Timboooh avatar Timboooh commented on August 12, 2024

Please see #163

from libredfish.

mraineri avatar mraineri commented on August 12, 2024

Fix merged

from libredfish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.