Skip to content

Instantly share code, notes, and snippets.

@paparent
Created June 10, 2011 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paparent/1019670 to your computer and use it in GitHub Desktop.
Save paparent/1019670 to your computer and use it in GitHub Desktop.
Sample JSON

Sample JSON for importation to fluidinfo

In the example.json, there's an example of a format from a Wordpress plugin could send to an external service.

Format

The section config is where to put connection to Fluidinfo (username and password).

The section data is for the actual data. It's an array of dict, which contains the full path tag and its value.

{
"config": {
"username": "User123",
"password": "pass123",
},
"data": [
{
"fluiddb/about": "http://wordpress.local/blah",
"paparent/wordpress/author-names": ["PA Parent"],
"paparent/wordpress/publication-date": "May 29th 2011",
"paparent/wordpress/publication-year": 2011,
"paparent/wordpress/publication-month": 5,
"paparent/wordpress/publication-day": 29,
"paparent/wordpress/publication-time": "18:59:43",
"paparent/wordpress/publication-timestamp": 1306713583.0,
"paparent/wordpress/text": "blah blah",
"paparent/wordpress/html": "blah <strong>blah</strong>",
"paparent/wordpress/title": "blah",
"paparent/wordpress/excerpt": "...",
"paparent/wordpress/status": "published",
"paparent/wordpress/modification-date": "June 10th 2011",
"paparent/wordpress/modification-year": 2011,
"paparent/wordpress/modification-month": 6,
"paparent/wordpress/modification-day": 10,
"paparent/wordpress/modification-time": "15:02:23",
"paparent/wordpress/modification-timestamp": 1307736143.0,
"paparent/wordpress/tags/blah": null,
"paparent/wordpress/tags/testing": null
},{
"fluiddb/about": "http://wordpress.local/blahblah",
"paparent/wordpress/author-names": ["Terry Jones", "Nicholas Tollervey"],
"paparent/wordpress/publication-date": "May 29th 2011",
"paparent/wordpress/publication-year": 2011,
"paparent/wordpress/publication-month": 5,
"paparent/wordpress/publication-day": 29,
"paparent/wordpress/publication-time": "18:59:43",
"paparent/wordpress/publication-timestamp": 1306713583.0,
"paparent/wordpress/text": "blah blah",
"paparent/wordpress/html": "blah <strong>blah</strong>",
"paparent/wordpress/title": "blahblah",
"paparent/wordpress/excerpt": "...",
"paparent/wordpress/status": "published",
"paparent/wordpress/modification-date": "June 10th 2011",
"paparent/wordpress/modification-year": 2011,
"paparent/wordpress/modification-month": 6,
"paparent/wordpress/modification-day": 10,
"paparent/wordpress/modification-time": "15:02:23",
"paparent/wordpress/modification-timestamp": 1307736143.0,
"paparent/wordpress/tags/blah": null,
"paparent/wordpress/tags/testing": null
}
]
}
@terrycojones
Copy link

I'd use fluiddb/about rather than /fluiddb/about.

@paparent
Copy link
Author

Thanks for the comment! I've added a README file to help explain why it's like that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment