Skip to content

vorburger/emfjson

 
 

Repository files navigation

EMFJSON is a JSON mapper for EMF


Build Status

Installation

See http://ghillairet.github.com/emfjson/

Releases

Snapshots

GWT Support

See GWT edition

Maven repository

A maven repository for emfjson is available, note that you should also include the denpendency and repository for jackson in your pom file. Please refer to the jackson documentation for more information.

<repository>
	<id>emfjson-repository</id>
	<url>http://repository-ghillairet.forge.cloudbees.com/snapshot</url>
	<snapshots>
		<enabled>true</enabled>
		<updatePolicy>always</updatePolicy>
	</snapshots>
</repository>

<dependency>
	<groupId>org.eclipselabs</groupId>
	<artifactId>org.eclipselabs.emfjson</artifactId>
	<version>0.6.0-SNAPSHOT</version>
</dependency>

Goals

Provide a JSON syntax and associated tools for EMF Models.

Features

  • JSON Syntax,
  • Support for JSON object referencing,
  • EMF Resource implementation,
  • Support for CouchDB

User Guide

See wiki

JSON Syntax

{
  "eClass" : "library.ecore#//Library",
  "name" : "SciFi Library",
  "writers" : [
    {
      "eClass" : "library.ecore#//Writer",
      "name" : "Isaac Asimov",
      "books" : [
        {"$ref" : "//@books.0"},
        {"$ref" : "//@books.1"}
      ]
    }
  ],
  "books" : [
    {
      "eClass" : "library.ecore#//Book",
      "title" : "Prelude to Foundation",
      "pages" : 505,
      "category" : "ScienceFiction",
      "author" : {"$ref" : "//@writers.0"}
    },
    {
      "eClass" : "library.ecore#//Book",
      "title" : "Forward the Foundation",
      "pages" : 464,
      "category" : "ScienceFiction",
      "author" : {"$ref" : "//@writers.0"}
    }
  ]
}

Dependencies

  • EMF 2.7.0 or later
  • Jackson 1.6.0 or later

License

This software is distributed under the terms of the Eclipse Public License 1.0 - http://www.eclipse.org/legal/epl-v10.html.