Page MenuHomePhabricator

[Story] Create infrastructure for optionally putting normalized values into JSON
Closed, InvalidPublic

Description

This ticket is about making Serializers and Unserializers aware of the possibility of normalized values in the JSON rendering of Snaks.

PropertyValueSnaks currently look like this:

"mainsnak":{"snaktype":"value","property":"P646","datatype":"string",
    "datavalue":{"value":"/m/0g5n7","type":"string"}
}

The normalized snak value would be added using an additional key on the same level as "datavalue", called "datavalue-normalized" (or some such):

"mainsnak":{"snaktype":"value","property":"P646","datatype":"string",
    "datavalue":{"value":"/m/0g5n7","type":"string"},
    "datavalue-normalized":{"value":"https://www.freebase.com/m/0g5n7","type":"string"},
}

Rough spec after discussion with Thiemo and Jan, 2015-06-17:

  • ExtendedPropertyValueSnak extends PropertyValueSnak ("Extended" is silly, find a better name). ExtendedPropertyValueSnak->values: map of "roles" (original, normalized, uri, url, iso, etc) to DataValue objects. T102791
  • Serializer/Unserializer get support for ExtendedPropertyValueSnak. T102833
  • Support for derived values (ExtendedPropertyValueSnak, FallbackTerm) can be disabled in serializer/unserializer (should be disabled for API input, and db storage). T102789, T102788
  • ValueExtender service, with specialized extenders for specific DataType. Used to manipulate Statements before serialization. T102835

Related Objects

Event Timeline

Tobi_WMDE_SW raised the priority of this task from to Normal.
Tobi_WMDE_SW updated the task description. (Show Details)
daniel updated the task description. (Show Details)Apr 17 2015, 1:36 PM
daniel set Security to None.
daniel updated the task description. (Show Details)Jun 17 2015, 12:42 PM
daniel updated the task description. (Show Details)Jun 17 2015, 4:01 PM
Jonas renamed this task from Create infrastructure for optionally putting normalized values into JSON to [Story] Create infrastructure for optionally putting normalized values into JSON.Sep 10 2015, 10:36 AM
Bene added a subscriber: Bene.Sep 17 2015, 2:58 PM
Addshore closed this task as Invalid.Jan 23 2019, 12:22 PM
Addshore added a subscriber: Addshore.

Task break down is no longer valid, and we have closed the epic T112548