Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can an accessor operate within another? #1794

Closed
tsjordan-eng opened this issue Dec 20, 2024 · 2 comments
Closed

Can an accessor operate within another? #1794

tsjordan-eng opened this issue Dec 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@tsjordan-eng
Copy link
Contributor

The accessors are a very powerful tool for decommutating packets. However, what if I have a binary telemeter that has a string item which I know to be json? Can I break out that string with an accessor?

Some alternatives may be:

  • using derived items with ruby that parses the json
  • pushing that packet item out a router and having another interface/target access it

Any other ideas?

@jmthomas jmthomas added the enhancement New feature or request label Jan 6, 2025
@jmthomas
Copy link
Member

jmthomas commented Jan 6, 2025

We're doing something similar with the http_accessor which uses a internal form_accessor to access the internal items. Unfortunately we don't have a good generic solution to this problem so I'll leave this open as an enhancements. I think @ryanmelt has some ideas ...

@ryanmelt
Copy link
Member

ryanmelt commented Jan 6, 2025

So you can do this already using object_read_conversion. However it will create one item that returns a hash.
I'm coming up with some methods to make the hash usable with some other tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants