deliter 203 Posted April 27, 2016 Report Share Posted April 27, 2016 awesome plugin Ayman thanks,only noticed it had the JSON wildcard selectors,always thought this was just a JSON parser,thanks Quote Link to post Share on other sites
APTS 3 Posted May 23, 2016 Report Share Posted May 23, 2016 (edited) Thanks for this great plugin Aymen. Can anyone explain how I can use this plugin to handle null values in JSON? For example, here is a list of 10 fields that I am trying to parse, however, when I add these items to a list, I don't get 10 results if any of the fields are null. set(#f01_Address,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Address"),"Global") set(#f02_CommRefCode,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.CommRefCode"),"Global") set(#f03_Comments,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Comments"),"Global") set(#f04_DA,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.DA"),"Global") set(#f05_Enhanced_Area,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Enhanced.Area"),"Global") set(#f06_Enhanced_Bedrooms,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Enhanced.Bedrooms"),"Global") set(#f07_Enhanced_CondoType,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Enhanced.CondoType"),"Global") set(#f08_Enhanced_Depth,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Enhanced.Depth"),"Global") set(#f09_Enhanced_DrivewayType,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Enhanced.DrivewayType"),"Global") set(#f10_Enhanced_Fireplaces,$plugin function("JSONpath.dll", "$JSONpath parser", #json, "$.Enhanced.Fireplaces"),"Global") add list to list(%EAIDetailRow,$list from text("{#f01_Address},{#f02_CommRefCode},{#f03_Comments},{#f04_DA},{#f05_Enhanced_Area},{#f06_Enhanced_Bedrooms},{#f07_Enhanced_CondoType},{#f08_Enhanced_Depth},{#f09_Enhanced_DrivewayType},{#f10_Enhanced_Fireplaces},",","),"Don\'t Delete","Global") What should I be doing to handle for null values in my JSON? I suppose one way to do this would be to test the length of each variable, and if it has zero length, then substitute that for "". Any other ideas for how to do this? Thanks. UPDATE: I solved this issue by replacing the null with a space in my JSON using this command: set(#json,$replace(#json,"null","\" \""),"Global")Now I am getting the correct number of fields in my list, even if there are nulls. Edited May 23, 2016 by APTS Quote Link to post Share on other sites
ykdm 0 Posted September 7, 2016 Report Share Posted September 7, 2016 The download link doesn't seem to work anymore. Quote Link to post Share on other sites
db00 5 Posted March 6, 2017 Report Share Posted March 6, 2017 Filtering doesn't seem to be working . These expression won't bring up nothingset(#BookswithISBNnumber,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[?(@.isbn)]"),"Global")set(#CheaperThan10Books,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[?(@.price<10)]"),"Global")set(#LastBook,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[(@.length-1)]"),"Global")set(#Priceis899,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[?(@.price==8.99)]"),"Global")set(#Morethan10price,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[?(@.price>10)]"),"Global")The expressions used above seem to be working in http://jsonpath.com/? all the code belowset(#testdata,"\{ \"store\": \{ \"book\": [ \{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": \"Sayings of the Century\", \"price\": 8.95 \}, \{ \"category\": \"fiction\", \"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 \}, \{ \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": \"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 \}, \{ \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 \} ], \"bicycle\": \{ \"color\": \"red\", \"price\": 19.95 \} \}\}","Global")set(#AuthorOfBooksOnly,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$.store.book[*].author"),"Global")set(#AllAuthors,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..author"),"Global")set(#AllStoreThings,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$.store.*"),"Global")set(#PriceOfEverythingInstore,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$.store..price"),"Global")set(#ThirdBook,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[2]"),"Global")set(#LastBook,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[(@.length-1)]"),"Global")set(#LastBook2,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[-1:]"),"Global")set(#First2books,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[0,1]"),"Global")set(#First2books2,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[:2]"),"Global")set(#BookswithISBNnumber,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[?(@.isbn)]"),"Global")set(#CheaperThan10Books,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..book[?(@.price<10)]"),"Global")set(#AllElementsInJson,$plugin function("JSONpath.dll", "$JSONpath parser", #testdata, "$..*"),"Global") Quote Link to post Share on other sites
sbm128 12 Posted July 4, 2017 Report Share Posted July 4, 2017 downloads dont work anymroe from the email that is sent Plese update if you get a chance! Quote Link to post Share on other sites
BeerNut 25 Posted August 26, 2017 Report Share Posted August 26, 2017 Any chance you could update the download links? They return a AWS error. Quote Link to post Share on other sites
steelersfan 38 Posted September 14, 2017 Report Share Posted September 14, 2017 Download link updated downloads dont work anymroe from the email that is sent Plese update if you get a chance! Any chance you could update the download links? They return a AWS error. Yes, can you please update this? Are you alive buddy? Quote Link to post Share on other sites
Marani 80 Posted September 14, 2017 Report Share Posted September 14, 2017 Yes, can you please update this? Are you alive buddy? Download with subscription works, but here is the list of Aymen's free plugins: http://ubot-plugins.com/free-plugins-downloads/ 1 Quote Link to post Share on other sites
steelersfan 38 Posted October 1, 2017 Report Share Posted October 1, 2017 Download with subscription works, but here is the list of Aymen's free plugins: http://ubot-plugins.com/free-plugins-downloads/Much thanks brother! I couldn't get subscription to work for me, you saved the day! Quote Link to post Share on other sites
ewideweb 0 Posted October 31, 2017 Report Share Posted October 31, 2017 wow, this subject is over two years old and I'm afraid still unsolved. I tried this plugin and found the same problems with the filter. Is there really no solution to parse json and filter properly within ubot? Quote Link to post Share on other sites
Tibret 5 Posted November 29, 2017 Report Share Posted November 29, 2017 Wow awesome Plugin, did a long search today and this solves a lot of problems! Thanks! Quote Link to post Share on other sites
SaHiN 14 Posted May 2, 2019 Report Share Posted May 2, 2019 hi,solve? thank you. Quote Link to post Share on other sites
Kev 69 Posted May 29, 2019 Report Share Posted May 29, 2019 Hi Aymen, tried downloading the plugin and seems the link isn't working. Are you still providing the plugin? Thanks! Quote Link to post Share on other sites
Marani 80 Posted May 29, 2019 Report Share Posted May 29, 2019 http://ubot-plugins.com/free-plugins-downloads/Hi Aymen, tried downloading the plugin and seems the link isn't working. Are you still providing the plugin? Thanks! Quote Link to post Share on other sites
robiardiyan 0 Posted July 27, 2019 Report Share Posted July 27, 2019 I need this plugin, but it can't be accessed on the web. can anyone share it for me. Thank you before Quote Link to post Share on other sites
HelloInsomnia 1103 Posted July 27, 2019 Report Share Posted July 27, 2019 I need this plugin, but it can't be accessed on the web. can anyone share it for me. Thank you before Link: http://ubot-plugins.com/wp-content/uploads/2016/09/JSONpath.zip 1 Quote Link to post Share on other sites
robiardiyan 0 Posted August 4, 2019 Report Share Posted August 4, 2019 Link: http://ubot-plugins.com/wp-content/uploads/2016/09/JSONpath.zipthank you Quote Link to post Share on other sites
computer 0 Posted December 13, 2019 Report Share Posted December 13, 2019 json path does not work.! Quote Link to post Share on other sites
SourceUltra 10 Posted December 19, 2019 Report Share Posted December 19, 2019 It's working for me. Is your json xpath right? example: $.object.item I tested it using a json array from cli.fyi/bat using the json xpath $.data.USD ($) to get the price for BAT, and it worked. ui button("Check price") { navigate("https://cli.fyi/bat","Wait") set(#PageGet,"\{{$page scrape("\{","\}")}\}","Global") set(#PriceCheck,$plugin function("JSONpath.dll", "$JSONpath parser", #PageGet, "$.data.USD ($)"),"Global") } ui stat monitor("Price",#PriceCheck) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.