public class JsonHandler extends Object
Constructor and Description |
---|
JsonHandler() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.emf.ecore.EObject |
deserializeJson(String pJson)
Deserializes the specified JSON String into an EObject.
|
static String |
serializeJson(org.eclipse.emf.ecore.EObject pEObject)
Serializes the specified EObject into a JSON String.
|
public static String serializeJson(org.eclipse.emf.ecore.EObject pEObject) throws IOException
pEObject
- the object to serializeIOException
- when serialization fails (likely due to a
malformed/invalid EObject)public static org.eclipse.emf.ecore.EObject deserializeJson(String pJson) throws IOException
pJson
- the String to deserializeIOException
- when deserialization fails (likely due to a
malformed/invalid JSON String)Copyright © 2017 smarTen. All rights reserved.