Adding support for compiled json path + json pointer (reflection based)#2483
Adding support for compiled json path + json pointer (reflection based)#2483
Conversation
|
On my TODO to review. This looks like very impressive work. |
|
Added json pointer support as well |
|
@FranciscoThiesen I do not understand the reflection part of the code. What does The compile-time expression parsing is pretty clear. I imagine that the main use case is that you have the expression validated at compile time... so no runtime surprise is possible. In theory it could result in better performance in some cases, but that is unclear to me. Still, having the expression validated at compile time makes sense. Many of these expressions are compile-time constants anyhow. What I am dubious about is the reflection... as I don't understand what it is meant to do? |
…ng compiled paths whenever you have them a priori.
We can not only validate the path using reflection, but also generate the accessor code. (this avoids the need to parse the path at run-time and initial benchmark shows strong efficient gains, specially for longer paths). |
|
Merging. Let us push it to the next release. |
This was asked for in #2070 . It shows an interesting way of leveraging reflection to support a real-world demand.