jsonyahoo-pipes

TXT->JSON with Yahoo! Pipes


I have a txt file on the web, that is constructed like this:

"key1 value1
 key2 value2
 key3 value3
..."

Can I using Yahoo! Pipes parse it to JSON? The end format should be like:

{key1 : value1, 
 key2 : value2, 
 key3 : value3, 
 ...}

Solution

  • Yes you can. Use Fetch CSV with space as separator, feed it through a Loop with String Builder to insert the colons and commas, then another String Builder to insert the braces. But beware of the last comma!

    Anyway that's the general idea to get you started...