[BNM] Json API response formats

Wayne Douglas wayne at sonatribe.com
Fri Jul 24 13:20:05 BST 2015


I like the links part of the JSON API spec too. Really cool for lazy
loading etc

On Fri, 24 Jul 2015 at 13:17, Hazlitt Eastman <hazlitt at manta9.com> wrote:

> Hmm, interesting discussion.
>
> When I write APIs I tend to structure the JSON responses to be as flat as
> possible to make them easy to parse.
>
> Hazlitt
>
>
>
>
> On 24/07/2015 13:02, "BNMlist on behalf of Wayne Douglas" <
> bnmlist-bounces at brightonnewmedia.org on behalf of wayne at sonatribe.com>
> wrote:
>
> >I prefer the JSON API spec: http://jsonapi.org
> >
> >On Fri, 24 Jul 2015 at 12:39, Toby Skinner <toby at globaloptima.co.uk>
> wrote:
> >
> >> On 24/07/2015 12:25, Helana Bryant wrote:
> >> > Any preference?
> >> >
> >> >
> >>
> http://stackoverflow.com/questions/12806386/standard-json-api-response-format
> >>
> >> I like the same sort of approach as the accepted answer: a success
> >> property, a message property for both successful requests (often null in
> >> this case) or errors and a data property for anything call specific like
> >> entity ids or result sets.
> >>
> >> {
> >>      status: true,
> >>      message: null,
> >>      data:null
> >> }
> >>
> >> {
> >>      status: false,
> >>      message: 'error occured',
> >>      data:null
> >> }
> >>
> >> Toby
> >>
> >> --
> >> Toby Skinner
> >>
> >> Director
> >> Global Optima Ltd
> >> Tel 0044 (0) 1273 252904
> >> Tel 0044 (0) 7970 076 226
> >> E-mail toby at globaloptima.co.uk
> >> Web globaloptima.co.uk
> >>
> >> --
> >>
> >> BNM Subscribe/Unsubscribe:
> >> http://www.brightonnewmedia.org/options/bnmlist
> >>
> >> BNM members often work together in the real world at:
> >> http://www.theskiff.org
> >>
> >> BNM powered by Wessex Networks:
> >> http://www.wessexnetworks.com
> >>
> >--
> >
> >BNM Subscribe/Unsubscribe:
> >http://www.brightonnewmedia.org/options/bnmlist
> >
> >BNM members often work together in the real world at:
> http://www.theskiff.org
> >
> >BNM powered by Wessex Networks:
> >http://www.wessexnetworks.com
> --
>
> BNM Subscribe/Unsubscribe:
> http://www.brightonnewmedia.org/options/bnmlist
>
> BNM members often work together in the real world at:
> http://www.theskiff.org
>
> BNM powered by Wessex Networks:
> http://www.wessexnetworks.com
>


More information about the BNMlist mailing list