Re-template json_pointer on string type#3415
Conversation
0f2ad02 to
f42848f
Compare
|
@nlohmann Can you please take a look at the Codacy report and tell me which tool is generating that |
537c699 to
081bce9
Compare
Looks like a false positive - I ignored the issue. This should become effective in the next check. |
Okay, thanks, I would have added |
|
Just a thought, instead of |
We'd still need (*) I mean, we don't have to but it's nice to avoid |
83b4a65 to
6483203
Compare
|
Once this passes review, prior to merge, I'd just like to do one last force-push to update commit messages with the issue references. Edit: Forgot to include |
Agreed that it only makes sense if the only things are string literals and string objects, but doesn't make sense if there are true raw pointers. |
bd2b691 to
d930a86
Compare
b5d983f to
fc3e0c0
Compare
falbrechtskirchinger
left a comment
There was a problem hiding this comment.
I discovered a few minor things in my full review. Will fix momentarily.
fc3e0c0 to
8f3b49e
Compare
falbrechtskirchinger
left a comment
There was a problem hiding this comment.
Ready for final review and merge.
Change exception context parameter to pointer and replace context with nullptr where appropriate.
Add variadic concat() function for concatenating char *, char, and string types.
8f3b49e to
28ef5ee
Compare
Change json_pointer from being templated on basic_json to being templated on string type.
bebf36a to
f5f975a
Compare
|
@nlohmann 3.10.6 is now 3.11.0, right? So I need to update the version numbers? |
Yes, so much has piled up. But I would have gone throw the release anyway to clean this up. |
|
You probably missed my comment on this closed PR: #3418 (comment) |
Not right now. |
2dcfd0c to
fdb15f9
Compare
|
Version numbers updated. Mixed in some accidental edits that were supposed to go into a different branch and fixed that too. |
|
Thanks! |


This PR changes the
json_pointertemplate parameter frombasic_jsonto string type and deals with unexpected complications.Most notably, a helper function for string concatenation is introduced to allow for some flexibility in the implementation of string types (and eliminate some temporaries as a positive side-effect). I'll leave it to others to remove more
std::stringAPI dependence (some low-hanging fruits areempty(),find_first_of(),substr()).To Do:
json_pointer<basic_json>.