24hourcampfire.com
24hourcampfire.com
-->
Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jan 2010
Posts: 23,540
KFWA Offline OP
Campfire Ranger
OP Offline
Campfire Ranger
Joined: Jan 2010
Posts: 23,540
Odd topic on a hunting forum but this place has experts on everything.

I want to find a program that will let me search thru several folders/sub directories of JSON and see all the examples of a certain value being used.

I'm trying to find a notepad++ extension that will do it. I really don't want to write a python program to do it if someone has already got an executable or an extension I can download

Here is it Xmas week and I'm supposed to be on vacation, but instead I'm phuggin around with this at work to make a customer happy.


Last edited by KFWA; 12/20/21.

have you paid your dues, can you moan the blues, can you bend them guitar strings
GB1

Joined: Jan 2012
Posts: 67,050
Campfire Kahuna
Offline
Campfire Kahuna
Joined: Jan 2012
Posts: 67,050
Local Dirt or Shaman

Joined: Nov 2006
Posts: 1,956
J
Campfire Regular
Offline
Campfire Regular
J
Joined: Nov 2006
Posts: 1,956
I have not been able to find any apps or extensions to do that. I typically go to jsoneditoronline.org. You can paste your json in and then search. It does not provide a list of values found but you can find each one. Its quick and dirty but it works.

Last edited by JimFromTN; 12/20/21.
Joined: Jan 2001
Posts: 28,379
Campfire Ranger
Offline
Campfire Ranger
Joined: Jan 2001
Posts: 28,379
Not a bona fide expert but I've worked with JSON a fair bit.

https://jsonformatter.org/json-parser

https://jsonparser.org/

Try one of these. Copy and paste your JSON formatted file on the left and the tree structure will be on the right. I haven't looked at them that closely but they seem to have filters to pick out strings.


Gunnery, gunnery, gunnery.
Hit the target, all else is twaddle!
Joined: Nov 2006
Posts: 1,956
J
Campfire Regular
Offline
Campfire Regular
J
Joined: Nov 2006
Posts: 1,956
Originally Posted by Jim in Idaho
Not a bona fide expert but I've worked with JSON a fair bit.

https://jsonformatter.org/json-parser

https://jsonparser.org/

Try one of these. Copy and paste your JSON formatted file on the left and the tree structure will be on the right. I haven't looked at them that closely but they seem to have filters to pick out strings.


jsoneditoronline.org does the same thing but has a search function.

IC B2

Joined: Jan 2010
Posts: 23,540
KFWA Offline OP
Campfire Ranger
OP Offline
Campfire Ranger
Joined: Jan 2010
Posts: 23,540
I'm looking at 400+ files , it would be a game changer for me if I could search multiple files.
Ideally I'd like to be able to write some JSON and have it auto fill in from the sub directory files.

Notepad++ is pretty good about searching thru multiple files for text but its not a smart search, I need a specific extension that does it for JSON.


have you paid your dues, can you moan the blues, can you bend them guitar strings
Joined: Apr 2001
Posts: 6,253
Campfire Tracker
Offline
Campfire Tracker
Joined: Apr 2001
Posts: 6,253
Bash script?



Joined: Jul 2015
Posts: 14,694
Campfire Outfitter
Offline
Campfire Outfitter
Joined: Jul 2015
Posts: 14,694
Originally Posted by KFWA
Notepad++ is pretty good about searching thru multiple files for text but its not a smart search, I need a specific extension that does it for JSON.

Not a JSON expert, but why can't you filter the NP++ search to only include the directories and file extensions you want to look at?


Politics is War by Other Means
Joined: Nov 2011
Posts: 30,963
A
Campfire 'Bwana
Offline
Campfire 'Bwana
A
Joined: Nov 2011
Posts: 30,963
How much Python do you know?
It has both a JSON library that's very handy for working with it.


You didn't use logic or reason to get into this opinion, I cannot use logic or reason to get you out of it.

You cannot over estimate the unimportance of nearly everything. John Maxwell
Joined: Jan 2010
Posts: 23,540
KFWA Offline OP
Campfire Ranger
OP Offline
Campfire Ranger
Joined: Jan 2010
Posts: 23,540
yea very little unfortunately.

I am unpacking the directories locally now and when it finishes I will see what NP++ can do OOTB


have you paid your dues, can you moan the blues, can you bend them guitar strings
IC B3

Joined: Jan 2020
Posts: 139
H
Campfire Member
Offline
Campfire Member
H
Joined: Jan 2020
Posts: 139
Hmm... Notepad++. Sounds like M$. Can't help much there. On Unix I'd probably use egrep/find or perl. I don't know to what extent these have been ported to M$.

Joined: Jan 2010
Posts: 23,540
KFWA Offline OP
Campfire Ranger
OP Offline
Campfire Ranger
Joined: Jan 2010
Posts: 23,540
I installed a program called XML Spy. No idea how good it is but it has a similar find in files feature that notepad++ has. I was able to find some documentation that has all the declarative UI statements, so I'll just manually search thru them today.

Last edited by KFWA; 12/20/21.

have you paid your dues, can you moan the blues, can you bend them guitar strings
Joined: Dec 2013
Posts: 44,309
Campfire 'Bwana
Online Content
Campfire 'Bwana
Joined: Dec 2013
Posts: 44,309
On unix or linux, I would just grep / egrep for the value. Depending on the version of windows you are on, you may be able to do the same, although it is a hidden feature.

Happy Holidays.


Slaves get what they need. Free men get what they want.

Rehabilitation is way overrated.

Orwell wasn't wrong.

GOA member
disappointed NRA member

24HCF SEARCH
Joined: Dec 2008
Posts: 8,305
Campfire Outfitter
Offline
Campfire Outfitter
Joined: Dec 2008
Posts: 8,305
You need a bash shell and use grep, Mac or linux are your huckelberry for stuff like that.


"Life is tough, even tougher if your stupid"
John Wayne
Joined: Jan 2010
Posts: 23,540
KFWA Offline OP
Campfire Ranger
OP Offline
Campfire Ranger
Joined: Jan 2010
Posts: 23,540
thanks, I'm crunched for time but I'll look into after Xmas when I'm bumming around the house

I'm using the search in files feature to walk thru the attribute values. Its tedious but I'm making progress.


Last edited by KFWA; 12/20/21.

have you paid your dues, can you moan the blues, can you bend them guitar strings
Joined: Jan 2010
Posts: 23,540
KFWA Offline OP
Campfire Ranger
OP Offline
Campfire Ranger
Joined: Jan 2010
Posts: 23,540
I ended up installing Microsoft Visual Studio Code (not visual studio).

It doesn't build the schema dictionary like I hoped but its a pretty powerful tool for I assume free. I just downloaded and installed it after a recommendation in some documentation I was using.


have you paid your dues, can you moan the blues, can you bend them guitar strings

Moderated by  RickBin 

Link Copied to Clipboard
AX24

77 members (10gaugemag, 808outdoors, 257robertsimp, 99Ozarks, 7mm_Loco, 9 invisible), 1,162 guests, and 724 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums81
Topics1,191,868
Posts18,478,685
Members73,948
Most Online11,491
Jul 7th, 2023


 


Fish & Game Departments | Solunar Tables | Mission Statement | Privacy Policy | Contact Us | DMCA
Hunting | Fishing | Camping | Backpacking | Reloading | Campfire Forums | Gear Shop
Copyright © 2000-2024 24hourcampfire.com, Inc. All Rights Reserved.



Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027)
Responsive Width:

PHP: 7.3.33 Page Time: 0.102s Queries: 14 (0.002s) Memory: 0.8638 MB (Peak: 0.9746 MB) Data Comp: Zlib Server Time: 2024-04-30 08:02:07 UTC
Valid HTML 5 and Valid CSS