Discussion Forums  >  Uncategorized

Replies: 15    Views: 414

Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
01/06/12 04:26 PM (14 years ago)

troubles with JSON

Having trouble importing Json data into Buzztouch from yahoo pipes. Looked into the forums some urls were broken with instructions. If anyone can hook me up with a url or explain how i can do this would be much appreciated. I may just be imputing the BT data wrong not sure.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/06/12 04:30 PM (14 years ago)
Have you validated the JSON at jsonlint.org? That's a good first step, and then making sure it's in the format that BT expects, via their documentation, which can be found on the left-hand menu of your control panel for an app. Mark
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/06/12 04:51 PM (14 years ago)
I did format at jsonlint.org. It is validated just having trouble formatting it for BT. I Formatted it (I hope correctly) then put it back into jsonlint.org and it is giving me invalid array length. I think I may be over complicating things. Or, missing a step.
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/06/12 07:05 PM (14 years ago)
Still Jacking something up is there a step by step on this?
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/06/12 09:45 PM (14 years ago)
which JSON structure/format are you trying to format for? I'm sure lots of us could post a sample of something working to compare your formatting against, but you haven't told us which JSON items you are trying to format!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/06/12 09:57 PM (14 years ago)
And I'd suggest starting super small...one location point, one menu, etc...until you nail the format, and then add a few more. Might be that you're already doing that, but since we haven't seen a sample, it's hard to say! Mark
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/06/12 10:37 PM (14 years ago)
I can give you a sample, but ya I am starting way to big using yahoo pipes. Thanks rgtichy and mark for you patience with me. This is just a sample. Main goal is to get a map finder to cover the whole US while focusing on one item. I have a lot to learn but that is the idea. count: 20, value: { title: Copy of Bar Finder, description: Find bars an pubs within 10 miles of a location, link: http://pipes.yahoo.com/pipes/pipe.info?_id=61c82860e77ea641277a0a5736928e77, pubDate: Sat, 07 Jan 2012 05:30:00 +0000, generator: http://pipes.yahoo.com/pipes/, callback: , items: [
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/07/12 11:07 AM (14 years ago)
Gimme a little time, Zzeek! I'm working with the pipe right now. I copied the pipe and truncated the results to 2 locations so that I could better see the data for the database (trees/forest). That Yahoo Local component adds in a lot of extra information I think we need to drop back out before trying to analyze the JSON format...
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/08/12 08:33 AM (14 years ago)
I am right about where you are/were: check out this pipe: http://pipes.yahoo.com/pipes/pipe.run?Location=Weston%2C+FL+33327&_id=fafff552905d2c8e029fead76968a6f9&_render=json Successes: I got rid of a lot of the extra information Failures (as yet): The JSON format output by Pipes is not configurable that I can see. I'm not sure what you know about pipes, so I'm going to tell you that you can also put render=csv on that link and get a csv file, which get you all the info, and still doesn't get you the essential JSON we all need. (But it looks clean enough to try and put thru another tool...) I have a couple of thoughts/ questions about the JSON files we can use. 1) Can they have anything extra in them? For example pipes wants there to be an element of every item called description and our childItems don't require a description. (Instead they have a subTitle.) 2) Do the items have to be in a particular order inside their correct {} pairs? 3) Does anybody know of a JSON re-formatter that runs as a web-service? I'm darn sure at this point that I have exhausted my thoughts on how to get Pipes to generate the exact JSON file we need. If there were another tool we could post the results to and re-format based on a template or something...
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/09/12 10:53 AM (14 years ago)
Great work! I had to take a couple days off. Was beating my head against my computer getting nowhere. I am going to work on this more tonight. I'll let you know what I find out. Great work Rgtichy. Zzeek
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/09/12 11:13 PM (14 years ago)
Let me elaborate. I am trying to Create a multi point mapping system using the entire united states and all locations available in my theme that I want to use. I would estimate over 200,000 locations. Maybe more. Instead of converting pipes to JSON and editing it to use on buzztouch. Is there an easy way to take the RSS Feed I create and input the URL on BT? I have searched the forums and found the RSS mod. Only I am not sure it works for android yet (if it does I could use a step by step on how to implement it). Any thoughts comments, or complaints? Please post away. Zzeek
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/10/12 04:45 AM (14 years ago)
Oh yeah! I thought you already knew this part... Your pipe allows for you to pass the current location of the device (lat, long) to the pipe and then it pulls only the bars within 10 miles. Your pipe has a user input field so the URL to the JSON items would be: http://pipes.yahoo.com/ishkabibble.pipe_run.php?location=[latitude] [longitude] This is all dependent on us getting the pipe to label our array childItems instead of items, and possible/likely to drop all of the descriptive stuff from the header level of the JSON output.
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/10/12 05:23 AM (14 years ago)
Or on one of us learning how to write something like a server side PHP that takes the pip output and re-formats the JSON to match exactly what we need...
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/10/12 10:44 AM (14 years ago)
Could you send me a link to your pipe? Also finding a lot with gps tracking using api keys thoughts?
 
Zzeek
Lost but trying
Profile
Posts: 21
Reg: Jan 04, 2012
East grand fork...
210
like
01/10/12 12:20 PM (14 years ago)
Google maps lets you get your own api key. We could implement this into either pipes or buzztouch I imagine. On my way to work, but let me know what you think once we find something useful we should re post this for everyone else. I am going to try and work the google api key into pipes this evening. I have a lot of ideas that I would like to run by you and see what you think....email me Jonyboy66666(at)gmail
 
rgtichy
Lost but trying
Profile
Posts: 104
Reg: Oct 14, 2011
Barrington
1,040
like
01/10/12 01:24 PM (14 years ago)
That location component you used in your pipe is capable of accepting latitude and longitude coordinates as input. You just have to look at the help for the module to see how to format the coords. (It's easy.) the pipe in my Sunday post will do it too (it's a copy of your pipe, to start and then I worked toward the JSON format (and failed so far))... http://pipes.yahoo.com/pipes/pipe.run?Location=[latitude] [longitude]&_id=fafff552905d2c8e029fead76968a6f9&_render=json or you can do this with google maps searching, but you have to use an html page instead of the maps screen: http://maps.google.com/maps?q=ATMs&hl=en&sll=[deviceLatitude],[deviceLongitude] (My Location)&iwloc=A&hl=en This will find ATM's around your current location, if you put it in a Buzztouch HTML screen. This is built on the Google Maps API, which you can read about at Google. Buzztouch replaces the [deviceLatitude] on the fly for you before opening the page, rsulting in a perfect query of Google for your location.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.