how to support another JSON flavour
-
Hello.
Thanks for your great plugin, first of all: just works… and code is clean ??
What would be the best way to have the plugin serialize the WP data into another flavour of JSON (a.o. leaving most of the internal “technical” informations away, simplifying attachments links, dates, custom categories links and more…)?
I want to feed my WP posts into a simile exhibit facet browsing view (see ao https://www.simile-widgets.org/exhibit/) , and therefore need a custom JSON looking like below:
{ "properties": { "taxonomy_sectors": { "label": "sector", "valueType": "CustomTaxonomyTerm" } }, "items": [ { "label": "Some nice post", "title": "Some nice post", "type": "Post", "id": 346, "slug": "some-nice-post", "url": "https://local/2013/04/29/some-nice-post/", "content": "<p>Some nice post</p>\n<p>with long content</p>\n", "excerpt": "<p>Some nice post</p>\n", "date": "2013-04-29", "thumbnail": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Portrait_of_George_Washington.jpeg/100px-Portrait_of_George_Washington.jpeg", "tags": [ "president", "nice", "USA" ], "categories": [ "Person", "Politics" ], "taxonomy_sectors": [ "Construction", "Tourism" ], "author": "Coco" }, { "label": "Construction", "description": "Building & Real-Estate", "slug": "construction", "id": 56, "url": "https://local/?sectors=construction", "type": "CustomTaxonomyTerm" }, { "label": "Tourism", "description": "Hotels, Cafés, Festivals and more", "slug": "tourism", "id": 72, "url": "https://local/?sectors=tourism", "type": "CustomTaxonomyTerm" } ] }
Official sample JSON file at https://simile.mit.edu/wiki/Exhibit/Template/JSON_Data_File – official documentation at https://simile.mit.edu/wiki/Exhibit/Understanding_Exhibit_Database
Any pointer / suggestion is welcome.
Berteh.
- The topic ‘how to support another JSON flavour’ is closed to new replies.