Skip to content

RepresentationReader should return mutable Representation #9

@lathspell

Description

@lathspell

Some APIs return the current state of an object so that the user can change some properties and then send the whole object back to server.

This use case seems to be impossible with HalBuilder as the RepresentationReader API only returns a ReadableRepresentation and there is no way to convert that to a modifyable Representation.

(of course I could copy all links, namespaces, properties and resources but that should be hidden in the API)

The issue seems to be easy fixable as Representation is a subclass of ReadableRepresentation so backwards compatibility is given. Also the returned object is explicitly converted from Representation to ImmutableRepresentation in JsonRepresentationReader's read() method so it would be enough to skip that step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions