Giter Site home page Giter Site logo

json2neo4j's Introduction

json2neo4j

A node.js based route to neo4j providing a REST interface that persists json documents as a group of neo4j nodes and relationships

Background

While neo4j has support for json, it is restricted to simple key:value pairs of string, number and arrays of string or number. nodejs acts as a front-end to neo4j to present a RESTful interface to neo4j. By POSTing a json string to the node.js route, the json structure is represented in neo4j as a group of nodes and relationships. GETting this group re-creates the original json.

Example

The following json file,

test = {
    "name":"simon",
    "age": 104,
    "address":{ "pcode":"bee",
      "address_lines":["one","two",{"x":'X',"y":23,"z":"zed"}]
    },
    "telephones":["01234-","09877-"]
}

is created in neo4j as the network set out below:

network diagram

API

Create a json Document

Description
url http://yourserver:yourport/jdoc
http POST
Action On POSTing a JSON string, the endpoint returns an _id which can be used in subsequent places where the API requires
Parameters none
Example Request

Progress

2014-07-03:

Generating basic 'create' statements prior to POST via a cypher query

json2neo4j's People

Contributors

simonshapiro avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.