in reply to convert JSON to JSON Paths -- try not to reinvent the wheel (?)
CPAN has JSON::Path which looks like it could do ?most/all? of what you need.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom