Ticket #146 (closed Enhancement: fixed)

Opened 13 years ago

Last modified 13 years ago

Extended serialization format for composite values

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.1
Component: DeepaMehta Standard Distribution Version: 4.0.5
Keywords: Cc:
Complexity: 8 Area:
Module:

Description (last modified by jri) (diff)

The entire child topics should be included.

This would allow the clients for richer evaluation, e.g. they could find out the ID of a Person's address topic and then fetch its geo facet.

Also for create and update requests the extended format should be utilized. This would abolish the peculiar "$id" syntax in conjunction with aggregations.

Example of current format (4.0.5):

{
    "id": 2371,
    "uri": "",
    "type_uri": "dm4.contacts.person"
    "value": "Jörg Richter",
    "composite": {
        "dm4.contacts.email_address": "jri@deepamehta.de",
        "dm4.contacts.person_name": {
            "dm4.contacts.first_name": "Jörg",
            "dm4.contacts.last_name": "Richter"
        }
    }
}

Suggested format:

{
    "id": 2371,
    "uri": "",
    "type_uri": "dm4.contacts.person",
    "value": "Jörg Richter",
    "composite": {
        "dm4.contacts.email_address": {
            "id": 2485,
            "uri": "",
            "type_uri": "dm4.contacts.email_address",
            "value": "jri@deepamehta.de",
            "composite": {
            }
        },
        "dm4.contacts.person_name": {
            "id": 2325,
            "uri": "",
            "type_uri": "dm4.contacts.person_name",
            "value": "Jörg Richter",
            "composite": {
                "dm4.contacts.first_name": {
                    "id": 2284,
                    "uri": "",
                    "type_uri": "dm4.contacts.first_name",
                    "value": "Jörg",
                    "composite": {
                    }
                },
                "dm4.contacts.last_name": {
                    "id": 2264,
                    "uri": "",
                    "type_uri": "dm4.contacts.last_name",
                    "value": "Richter",
                    "composite": {
                    }
                }
            }
        }
    }
}

Change History

comment:1 Changed 13 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 13 years ago by jri

  • Description modified (diff)
  • Summary changed from Extend composite value serialization format to Extended serialization format for composite values

comment:3 Changed 13 years ago by Jörg Richter

Extended format for composite values Pt.5 (#146).

Fix composite value cloning.

The change of the composite value format is now complete.

See ticket 146.

comment:4 Changed 13 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed

Note: the extended format is only used for responses (as send by the server).

For requests (as send to the server) and in declarative migrations (JSON) the compact format is still being used as it is more convenient for plugin and client developers.

comment:5 Changed 13 years ago by Jörg Richter

Extended format for composite values Pt.5 (#146).

Fix composite value cloning.

The change of the composite value format is now complete.

See ticket 146.

comment:6 Changed 13 years ago by Jörg Richter

Extended format for composite values Pt.5 (#146).

Fix composite value cloning.

The change of the composite value format is now complete.

See ticket 146.

Note: See TracTickets for help on using tickets.