Skip to content

Spray JSON Support : createEntityFromJson with missing fields #169

@alexd6631

Description

@alexd6631

createEntityFromJson allows you construct entity with missing "required" fields in the JSON

For instance given the following model :

class Person(var firstName: String,
              var lastName: String,
              var age: Int) extends Entity

it is possible to create an entity with the json data :

{ "firstName": "alex", "lastName" : "test"}

However, the entity will be in a very inconsistent state. A more appropriate behaviour would be to reproduce the logic in EntityMap.createEntityUsingConstructor, ie preventing creation of entity if no matching constructor is found.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions