Closed fkucuk closed 7 years ago
While testing I've realized that annotation POST only works with the following format:
{ "context":"http://www.w3.org/ns/anno.jsonld", "annotation_id":"http://574heritago.com/annotations/null/", "type":"Annotation", "creator":"me", "body":[ { "type":"video", "format":"text/plain", "value":"loved it" } ], "target":[ { "type":"text", "format":"text/plain", "selector":[ { "type":"FragmentSelector", "conformsTo":"http://tools.ietf.org/rfc/rfc5147", "value":"char=2,4" } ] } ] }
for instance it does not support the following selector:
{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno22", "type": "Annotation", "body": "http://example.org/note1", "target": { "source": "http://example.org/page1.html", "selector": { "type": "XPathSelector", "value": "/html/body/p[2]/table/tr[2]/td[3]/span" } } }
To support defined formats the serializer has to be polymorphic.
we can (should) define body and target models as text.
talked to @TalatCikikci, it is okay with the first format.
While testing I've realized that annotation POST only works with the following format:
for instance it does not support the following selector:
To support defined formats the serializer has to be polymorphic.