Skip to content

JSON - Hypermedia or references support? #87

@bclozel

Description

@bclozel

See issue resthub/resthub-spring-stack#45 for the server part.

How should we consider support for:

  • JSON references - (de)serializing object graphs and preventing duplication or circular references, using references.
  • Hypermedia - adding metadata to serialized objects to allow lazy loading through additional API calls on the client side.

We should consider only one of those options.

JSON reference

On the client side, several libs achieved this:

There are problems on the server side: Jackson doesn't support the json-ref syntax "$ref" and only relies on having typed objects on both client/server sides (see ObjectIdentity).

There are also problems on the client side; javascript client libs duplicate data, i.e. they expand the object graph with their values. This can be problematic when updating data on the client side.

Hypermedia

We could consider HAL and/or json-ld formats and integrate those on the client side for lazy-loading and metadata.

We could integrate those within backbone using:

Of course, I'm all for Hypermedia!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions