Friday, February 15, 2013

JSON Editor v1.5 now available in App Store!

A new version of JSON Editor is available in App Store.  What's new in this version:

OAuth 2.0 Support
• OAuth 2.0 is now supported for the following providers: bitly, Facebook, Foursquare, GitHub, Google, Instagram
• You can setup new OAuth 2.0 authorizations from "HTTP Client" window, by selecting "+"->"New OAuth 2.0 Authorization", or from HTTP request's details by selecting "OAuth pull down"->"Add..."
• Once you have added and setup an OAuth 2.0 authorization you can attach it to a HTTP request from "OAuth" pull down control. Once this is done, JSON Editor will take care of refreshing and attaching access token to your request.

Other changes and improvements
• If the HTTP response doesn't contain a "Content-Type" HTTP header then the response will be treated as text.
• If the HTTP response has a "Content-Type" of "text/javascript" then the response will be treated as JSON, thus no warnings will be shown when you try to "Beautify" or "Open in New JSON Document"
• Fixed a crash which might occur when getting HTTP response from server.

12 comments:

  1. Vlad,

    I'm somewhat new to OAuth - I know that the new SharePoint 2013 uses OAuth 2.0, and I think SalesForce.com does as well. It's great to see OAuth support, but I was under the impression it was an open standard so I don't understand why the app only works with these providers? I do like and appreciate the pre-populated Endpoint URL's , but I wonder why there is not an open one that we can enter anything we want?

    I also wanted to thank you - I am new to JSON and was just messing around. I had a sample json file with duplicate keys at the object level.

    {
    "Video" : {
    "NewKey" : "String1"
    },
    "Video" : {
    "NewKey" : "String2"
    }
    }

    Other programs would say this was valid, but would then loose the second object, or even Crash.

    Your JSON Editor was the ONLY one who's validator caught this and on top of this, it clearly told me what the problem was! That alone was worth the price of the app!

    Very thankful,

    - Jack

    ReplyDelete
    Replies
    1. Hey Jack, thanks a lot for your feedback. I really appreciate it and I'm happy you find JSON Editor useful.
      Related to OAuth 2.0 issue you have: OAuth 2.0 is indeed an open standard, however, there are slight variations of how it is implemented by various providers. For example, Facebook expects access token to be sent as a URL query parameter named "oauth_token". Instagram, on the other hand, expects "access_token". Google will expect it to be in "Authorization" HTTP header.
      It took my awhile until I found a pattern of the differences (and constants) between all these providers, and I was a little bit lazy of implementing the "Custom" provider, given that all 6 providers were implemented at that point and I was really eager to release JSON Editor v1.5. However, you can bet for the next version there will be a "Custom" option and maybe more pre-defined providers.
      Thanks again and anytime you have issues or feedback just drop me a message and I will be more than glad to reply.

      Delete
    2. I am also looking forward to an OAuth v2 'custom' provider option!

      Delete
  2. JSON Editor 1.5 does not display the content returned on 401 status codes
    the HTTP Response body field is always blank.

    I verified this with curl. Curl returns a response body but JSON Editor does not on 401

    ReplyDelete
  3. Hey Samuel,
    I'm gonna investigate this and see what's wrong.

    ReplyDelete
  4. Hi Vlade I really like the simplicity of JSON Editor however I do miss autosave and/or a warning when closing a modified file without saving.

    ReplyDelete
  5. Hello Vlad,

    I use JSON Editor an it looks like it handles all the changes "in place"
    without reading all the file into the memory. Could you please hint wha is the trick. thanks a lot for response. my email - vkhaskel@hotmail.com

    ReplyDelete
    Replies
    1. Hi Vadim,

      The file is read (entirely) and the whole JSON tree is kept in memory. Can you please tell me why you're asking this question? Is it because of a bug or just for you to know how is implements? :)

      Delete
  6. Hello Vlad,

    I enjoy JE a lot, but encounter a problem when trying to edit such entry with the JSON Tree view...
    {
    "Oups": "This\nis not\neditable!"
    }
    ...as it looks that "carriage returns" are not handled correctly in strings.

    Of course, it is just a "cosmetic" problem : and switching to the raw view allows editing but, maybe, in a next update, you may adjust this kind of raws to increase height accordingly, or, if this change is not easy, let the "one line view" always display the cursor (instead of a "locked" view of the "middle" of the sentence). Best regards,

    Fred

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. +1 for this fix. It would be very nice if it would show in multiple lines, but at the very least, it should not parse the /n when it is enclosed in double quotes when showing the viewing in tree view.

      Delete
  7. There's a bug in the HTTP Client that needs fixing. When editing the post body, if I enter a double quote, it will be entered as a "fancy quote" that will result in a parse error with the device that I am posting to. The double quotes need to be just plain old basic low ascii double quotes. In order to fix this, I have to make the edit in a JSON window and then paste it back into the HTTP client.

    ReplyDelete