polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [18/50] [abbrv] polygene-java git commit: New (de)serialization API and SPI & new implementations
Date Mon, 13 Mar 2017 10:35:10 GMT
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
index 69d460e..9d66d36 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/ContinuousIntegrationTest.java
@@ -19,13 +19,6 @@
  */
 package org.apache.polygene.library.rest.client;
 
-import org.apache.polygene.test.AbstractPolygeneTest;
-import org.apache.polygene.test.util.FreePortFinder;
-import org.hamcrest.CoreMatchers;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.property.Property;
@@ -53,7 +46,13 @@ import org.apache.polygene.library.rest.server.api.ContextRestlet;
 import org.apache.polygene.library.rest.server.assembler.RestServerAssembler;
 import org.apache.polygene.library.rest.server.restlet.NullCommandResult;
 import org.apache.polygene.library.rest.server.spi.CommandResult;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
+import org.apache.polygene.test.AbstractPolygeneTest;
+import org.apache.polygene.test.util.FreePortFinder;
+import org.hamcrest.CoreMatchers;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 import org.restlet.Client;
 import org.restlet.Request;
 import org.restlet.Response;
@@ -89,7 +88,6 @@ public class ContinuousIntegrationTest
         throws AssemblyException
     {
         // General setup of client and server
-        new OrgJsonValueSerializationAssembler().assemble( module );
         new ClientAssembler().assemble( module );
         new ValueAssembler().assemble( module );
         new RestServerAssembler().assemble( module );
@@ -434,12 +432,12 @@ public class ContinuousIntegrationTest
         public BuildResult buildStatus( BuildSpec build )
         {
             String buildNo = build.buildNo().get(); // or lookup by tag
-            return module.newValueFromSerializedState( BuildResult.class, "{ 'buildNo':'" + buildNo + "', 'testsPassed': 37, 'testsFailed': 1}" );
+            return module.newValueFromSerializedState( BuildResult.class, "{ \"buildNo\":\"" + buildNo + "\", \"testsPassed\": 37, \"testsFailed\": 1}" );
         }
 
         public ServerStatus serverStatus()
         {
-            return module.newValueFromSerializedState( ServerStatus.class, "{'currentStatus':'Idle', 'availableAgents': 2  }" );
+            return module.newValueFromSerializedState( ServerStatus.class, "{\"currentStatus\":\"Idle\", \"availableAgents\": 2  }" );
         }
 
         public void tagBuild( TagBuildCommand command )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
----------------------------------------------------------------------
diff --git a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
index a5344d8..bb241df 100644
--- a/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
+++ b/libraries/rest-client/src/test/java/org/apache/polygene/library/rest/client/RssReaderTest.java
@@ -27,8 +27,6 @@ import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
-import org.junit.BeforeClass;
-import org.junit.Test;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.rest.client.api.ContextResourceClient;
@@ -40,7 +38,8 @@ import org.apache.polygene.library.rest.client.spi.ResponseReader;
 import org.apache.polygene.library.rest.client.spi.ResultHandler;
 import org.apache.polygene.library.rest.common.ValueAssembler;
 import org.apache.polygene.test.AbstractPolygeneTest;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
+import org.junit.BeforeClass;
+import org.junit.Test;
 import org.restlet.Client;
 import org.restlet.Response;
 import org.restlet.data.Protocol;
@@ -75,7 +74,6 @@ public class RssReaderTest
         throws AssemblyException
     {
         // General setup of client
-        new OrgJsonValueSerializationAssembler().assemble( module );
         new ClientAssembler().assemble( module );
         new ValueAssembler().assemble( module );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/Resource.java
----------------------------------------------------------------------
diff --git a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/Resource.java b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/Resource.java
index 454a961..d9d17d7 100644
--- a/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/Resource.java
+++ b/libraries/rest-common/src/main/java/org/apache/polygene/library/rest/common/Resource.java
@@ -55,7 +55,7 @@ public interface Resource
     Link resource(String relation);
 
     @Optional
-    Property<ValueComposite> index();
+    Property<Object> index();
 
     abstract class Mixin
         implements Resource

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
index a50f29c..25cb0df 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/api/ContextResource.java
@@ -428,7 +428,7 @@ public class ContextResource
 
                 if( index != null && index instanceof ValueComposite )
                 {
-                    builder.prototype().index().set( (ValueComposite) index );
+                    builder.prototype().index().set( index );
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
index b4736af..48c32b0 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/requestreader/DefaultRequestReader.java
@@ -41,14 +41,14 @@ import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.property.PropertyDescriptor;
 import org.apache.polygene.api.service.qualifier.Tagged;
+import org.apache.polygene.api.serialization.Deserializer;
+import org.apache.polygene.api.serialization.Serialization;
+import org.apache.polygene.api.serialization.SerializationException;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.api.value.ValueBuilder;
 import org.apache.polygene.api.value.ValueBuilderFactory;
 import org.apache.polygene.api.value.ValueComposite;
-import org.apache.polygene.api.value.ValueDeserializer;
-import org.apache.polygene.api.value.ValueSerialization;
-import org.apache.polygene.api.value.ValueSerializationException;
 import org.apache.polygene.library.rest.server.spi.RequestReader;
 import org.restlet.Request;
 import org.restlet.Response;
@@ -86,8 +86,8 @@ public class DefaultRequestReader
     private ValueBuilderFactory vbf;
 
     @Service
-    @Tagged( ValueSerialization.Formats.JSON )
-    private ValueDeserializer valueDeserializer;
+    @Tagged( Serialization.Formats.JSON )
+    private Deserializer deserializer;
 
     @Override
     @SuppressWarnings( "unchecked" )
@@ -303,9 +303,9 @@ public class DefaultRequestReader
                     {
                         try
                         {
-                            return valueDeserializer.deserialize( module, propertyDescriptor.valueType(), value );
+                            return deserializer.deserialize( module, propertyDescriptor.valueType(), value );
                         }
-                        catch( ValueSerializationException e )
+                        catch( SerializationException e )
                         {
                             throw new IllegalArgumentException( "Query parameter has invalid JSON format", e );
                         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/AbstractResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/AbstractResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/AbstractResponseWriter.java
index 7a8458e..358d81d 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/AbstractResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/AbstractResponseWriter.java
@@ -20,7 +20,6 @@
 
 package org.apache.polygene.library.rest.server.restlet.responsewriter;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import org.apache.polygene.library.rest.server.spi.ResponseWriter;
@@ -36,7 +35,7 @@ import org.restlet.representation.Variant;
 public abstract class AbstractResponseWriter
     implements ResponseWriter
 {
-    protected static List<Language> ENGLISH = Arrays.asList( Language.ENGLISH );
+    protected static List<Language> ENGLISH = Collections.singletonList( Language.ENGLISH );
 
     protected Variant getVariant( Request request,
                                   List<Language> possibleLanguages,

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/DefaultResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/DefaultResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/DefaultResponseWriter.java
index 8e480bf..1091612 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/DefaultResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/DefaultResponseWriter.java
@@ -20,7 +20,7 @@
 
 package org.apache.polygene.library.rest.server.restlet.responsewriter;
 
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import org.restlet.Response;
 import org.restlet.data.MediaType;
@@ -33,7 +33,7 @@ import org.restlet.resource.ResourceException;
 public class DefaultResponseWriter
     extends AbstractResponseWriter
 {
-    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.APPLICATION_JSON );
+    private static final List<MediaType> supportedMediaTypes = Collections.singletonList( MediaType.APPLICATION_JSON );
 
     @Override
     public boolean writeResponse( final Object result, final Response response )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/FormResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/FormResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/FormResponseWriter.java
index 233a80b..f59d166 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/FormResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/FormResponseWriter.java
@@ -29,8 +29,10 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.json.JSONException;
-import org.json.JSONObject;
+import javax.json.Json;
+import javax.json.JsonException;
+import javax.json.JsonObjectBuilder;
+import javax.json.JsonValue;
 import org.apache.polygene.api.injection.scope.Service;
 import org.restlet.Response;
 import org.restlet.data.Form;
@@ -47,7 +49,8 @@ import org.restlet.resource.ResourceException;
 public class FormResponseWriter
     extends AbstractResponseWriter
 {
-    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML, MediaType.APPLICATION_JSON );
+    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML,
+                                                                              MediaType.APPLICATION_JSON );
 
     @Service
     private Configuration cfg;
@@ -61,7 +64,7 @@ public class FormResponseWriter
             MediaType type = getVariant( response.getRequest(), ENGLISH, supportedMediaTypes ).getMediaType();
             if( MediaType.APPLICATION_JSON.equals( type ) )
             {
-                JSONObject json = new JSONObject();
+                JsonObjectBuilder builder = Json.createObjectBuilder();
                 Form form = (Form) result;
                 try
                 {
@@ -70,21 +73,21 @@ public class FormResponseWriter
                         String value = parameter.getValue();
                         if( value == null )
                         {
-                            json.put( parameter.getName(), JSONObject.NULL );
+                            builder.add( parameter.getName(), JsonValue.NULL );
                         }
                         else
                         {
-                            json.put( parameter.getName(), value );
+                            builder.add( parameter.getName(), value );
                         }
                     }
                 }
-                catch( JSONException e )
+                catch( JsonException e )
                 {
                     e.printStackTrace();
                 }
 
-                StringRepresentation representation
-                    = new StringRepresentation( json.toString(), MediaType.APPLICATION_JSON );
+                StringRepresentation representation = new StringRepresentation( builder.build().toString(),
+                                                                                MediaType.APPLICATION_JSON );
                 response.setEntity( representation );
 
                 return true;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/JSONResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/JSONResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/JSONResponseWriter.java
index 86fc8d6..6b9af86 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/JSONResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/JSONResponseWriter.java
@@ -22,7 +22,7 @@ package org.apache.polygene.library.rest.server.restlet.responsewriter;
 
 import java.util.Arrays;
 import java.util.List;
-import org.json.JSONObject;
+import javax.json.JsonObject;
 import org.restlet.Response;
 import org.restlet.data.MediaType;
 import org.restlet.representation.StringRepresentation;
@@ -33,28 +33,28 @@ import org.restlet.resource.ResourceException;
  */
 public class JSONResponseWriter extends AbstractResponseWriter
 {
-    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML, MediaType.APPLICATION_JSON );
+    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML,
+                                                                              MediaType.APPLICATION_JSON );
 
     @Override
-    public boolean writeResponse( final Object result, final Response response )
-        throws ResourceException
+    public boolean writeResponse( Object result, Response response ) throws ResourceException
     {
-        if( result instanceof JSONObject )
+        if( result instanceof JsonObject )
         {
             MediaType type = getVariant( response.getRequest(), ENGLISH, supportedMediaTypes ).getMediaType();
             if( MediaType.APPLICATION_JSON.equals( type ) )
             {
-                JSONObject json = (JSONObject) result;
-                StringRepresentation representation
-                    = new StringRepresentation( json.toString(), MediaType.APPLICATION_JSON );
+                JsonObject json = (JsonObject) result;
+                StringRepresentation representation = new StringRepresentation( json.toString(),
+                                                                                MediaType.APPLICATION_JSON );
                 response.setEntity( representation );
                 return true;
             }
             else if( MediaType.TEXT_HTML.equals( type ) )
             {
-                JSONObject json = (JSONObject) result;
-                StringRepresentation representation
-                    = new StringRepresentation( json.toString(), MediaType.TEXT_HTML );
+                JsonObject json = (JsonObject) result;
+                StringRepresentation representation = new StringRepresentation( json.toString(),
+                                                                                MediaType.TEXT_HTML );
                 response.setEntity( representation );
                 return true;
             }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/LinksResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/LinksResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/LinksResponseWriter.java
index dea6f15..dcac1db 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/LinksResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/LinksResponseWriter.java
@@ -25,6 +25,7 @@ import freemarker.template.TemplateException;
 import java.io.IOException;
 import java.io.Writer;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -46,7 +47,7 @@ import org.restlet.resource.ResourceException;
 public class LinksResponseWriter
     extends AbstractResponseWriter
 {
-    private static final List<MediaType> supportedLinkMediaTypes = Arrays.asList( MediaType.APPLICATION_JSON );
+    private static final List<MediaType> supportedLinkMediaTypes = Collections.singletonList( MediaType.APPLICATION_JSON );
     private static final List<MediaType> supportedLinksMediaTypes = Arrays.asList( MediaType.TEXT_HTML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM );
 
     @Service

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
index a2ec82b..bbe758c 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/TableResponseWriter.java
@@ -28,13 +28,18 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonException;
+import javax.json.JsonObjectBuilder;
 import org.apache.polygene.api.injection.scope.Service;
+import org.apache.polygene.api.injection.scope.Structure;
+import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.library.rest.common.table.Cell;
 import org.apache.polygene.library.rest.common.table.Column;
 import org.apache.polygene.library.rest.common.table.Row;
 import org.apache.polygene.library.rest.common.table.Table;
-import org.json.JSONException;
-import org.json.JSONWriter;
+import org.apache.polygene.spi.serialization.JsonSerializer;
 import org.restlet.Response;
 import org.restlet.data.CharacterSet;
 import org.restlet.data.MediaType;
@@ -47,7 +52,14 @@ import org.restlet.resource.ResourceException;
  */
 public class TableResponseWriter extends AbstractResponseWriter
 {
-    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML, MediaType.APPLICATION_JSON );
+    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML,
+                                                                              MediaType.APPLICATION_JSON );
+
+    @Structure
+    private ModuleDescriptor module;
+
+    @Service
+    private JsonSerializer jsonSerializer;
 
     @Service
     private Configuration cfg;
@@ -61,7 +73,6 @@ public class TableResponseWriter extends AbstractResponseWriter
             MediaType type = getVariant( response.getRequest(), ENGLISH, supportedMediaTypes ).getMediaType();
             if( MediaType.APPLICATION_JSON.equals( type ) )
             {
-
                 response.setEntity( new WriterRepresentation( MediaType.APPLICATION_JSON )
                 {
                     @Override
@@ -70,11 +81,12 @@ public class TableResponseWriter extends AbstractResponseWriter
                     {
                         try
                         {
-                            JSONWriter json = new JSONWriter( writer );
+                            JsonObjectBuilder builder = Json.createObjectBuilder();
                             Table tableValue = (Table) result;
 
                             // Parse parameters
-                            String tqx = response.getRequest().getResourceRef().getQueryAsForm().getFirstValue( "tqx" );
+                            String tqx = response.getRequest().getResourceRef().getQueryAsForm()
+                                                 .getFirstValue( "tqx" );
                             String reqId = null;
                             if( tqx != null )
                             {
@@ -92,77 +104,71 @@ public class TableResponseWriter extends AbstractResponseWriter
                                 }
                             }
 
-                            json.object().key( "version" ).value( "0.6" );
+                            builder.add( "version", "0.6" );
                             if( reqId != null )
                             {
-                                json.key( "reqId" ).value( reqId );
+                                builder.add( "reqId", reqId );
                             }
-                            json.key( "status" ).value( "ok" );
-                            json.key( "table" ).object();
+                            builder.add( "status", "ok" );
+
+                            JsonObjectBuilder tableBuilder = Json.createObjectBuilder();
+                            JsonArrayBuilder colsBuilder = Json.createArrayBuilder();
                             List<Column> columnList = tableValue.cols().get();
-                            json.key( "cols" ).array();
                             for( Column columnValue : columnList )
                             {
-                                json.object().
-                                    key( "id" ).value( columnValue.id().get() ).
-                                    key( "label" ).value( columnValue.label().get() ).
-                                    key( "type" ).value( columnValue.columnType().get() ).
-                                    endObject();
+                                colsBuilder.add( Json.createObjectBuilder()
+                                                     .add( "id", columnValue.id().get() )
+                                                     .add( "label", columnValue.label().get() )
+                                                     .add( "type", columnValue.columnType().get() )
+                                                     .build() );
                             }
-                            json.endArray();
+                            tableBuilder.add( "cols", colsBuilder.build() );
 
-                            json.key( "rows" ).array();
+                            JsonArrayBuilder rowsBuilder = Json.createArrayBuilder();
                             for( Row rowValue : tableValue.rows().get() )
                             {
-                                json.object();
-                                json.key( "c" ).array();
+                                JsonArrayBuilder cellsBuilder = Json.createArrayBuilder();
                                 int idx = 0;
                                 for( Cell cellValue : rowValue.c().get() )
                                 {
-                                    json.object();
                                     Object value = cellValue.v().get();
-                                    if( columnList.get( idx )
-                                            .columnType()
-                                            .get()
-                                            .equals( Table.DATETIME ) && value != null )
+                                    if( columnList.get( idx ).columnType().get().equals( Table.DATETIME )
+                                        && value != null )
                                     {
                                         value = value.toString();
                                     }
-                                    else if( columnList.get( idx )
-                                                 .columnType()
-                                                 .get()
-                                                 .equals( Table.DATE ) && value != null )
+                                    else if( columnList.get( idx ).columnType().get().equals( Table.DATE )
+                                             && value != null )
                                     {
                                         value = value.toString();
                                     }
-                                    else if( columnList.get( idx )
-                                                 .columnType()
-                                                 .get()
-                                                 .equals( Table.TIME_OF_DAY ) && value != null )
+                                    else if( columnList.get( idx ).columnType().get().equals( Table.TIME_OF_DAY )
+                                             && value != null )
                                     {
                                         value = value.toString();
                                     }
 
+                                    JsonObjectBuilder cellBuilder = Json.createObjectBuilder();
                                     if( value != null )
                                     {
-                                        json.key( "v" ).value( value );
+                                        cellBuilder.add( "v", jsonSerializer.toJson( value ) );
                                     }
                                     if( cellValue.f().get() != null )
                                     {
-                                        json.key( "f" ).value( cellValue.f().get() );
+                                        cellBuilder.add( "f", cellValue.f().get() );
                                     }
-                                    json.endObject();
-
+                                    cellsBuilder.add( cellBuilder.build() );
                                     idx++;
                                 }
-                                json.endArray();
-                                json.endObject();
+                                JsonObjectBuilder rowBuilder = Json.createObjectBuilder();
+                                rowBuilder.add( "c", cellsBuilder.build() );
+                                rowsBuilder.add( rowBuilder.build() );
                             }
-                            json.endArray();
-                            json.endObject();
-                            json.endObject();
+                            tableBuilder.add( "rows", rowsBuilder.build() );
+                            builder.add( "table", tableBuilder.build() );
+                            writer.write( builder.build().toString() );
                         }
-                        catch( JSONException e )
+                        catch( JsonException e )
                         {
                             throw new IOException( e );
                         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueCompositeResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueCompositeResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueCompositeResponseWriter.java
index 9978b29..a50e9ca 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueCompositeResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueCompositeResponseWriter.java
@@ -32,9 +32,9 @@ import java.util.List;
 import java.util.Map;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.service.qualifier.Tagged;
+import org.apache.polygene.api.serialization.Serialization;
+import org.apache.polygene.api.serialization.Serializer;
 import org.apache.polygene.api.value.ValueComposite;
-import org.apache.polygene.api.value.ValueSerialization;
-import org.apache.polygene.api.value.ValueSerializer;
 import org.restlet.Response;
 import org.restlet.data.MediaType;
 import org.restlet.representation.Representation;
@@ -53,8 +53,8 @@ public class ValueCompositeResponseWriter extends AbstractResponseWriter
     private Configuration cfg;
 
     @Service
-    @Tagged( ValueSerialization.Formats.JSON )
-    private ValueSerializer valueSerializer;
+    @Tagged( Serialization.Formats.JSON )
+    private Serializer serializer;
 
     @Override
     public boolean writeResponse( final Object result, final Response response )
@@ -65,7 +65,7 @@ public class ValueCompositeResponseWriter extends AbstractResponseWriter
             MediaType type = getVariant( response.getRequest(), ENGLISH, supportedMediaTypes ).getMediaType();
             if( MediaType.APPLICATION_JSON.equals( type ) )
             {
-                StringRepresentation representation = new StringRepresentation( valueSerializer.serialize( result ),
+                StringRepresentation representation = new StringRepresentation( serializer.serialize( result ),
                                                                                 MediaType.APPLICATION_JSON );
                 response.setEntity( representation );
                 return true;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueDescriptorResponseWriter.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueDescriptorResponseWriter.java b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueDescriptorResponseWriter.java
index 7ff8a84..c438a5b 100644
--- a/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueDescriptorResponseWriter.java
+++ b/libraries/rest-server/src/main/java/org/apache/polygene/library/rest/server/restlet/responsewriter/ValueDescriptorResponseWriter.java
@@ -28,12 +28,14 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import javax.json.Json;
+import javax.json.JsonException;
+import javax.json.JsonObjectBuilder;
+import javax.json.JsonValue;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.value.ValueDescriptor;
-import org.json.JSONException;
-import org.json.JSONObject;
 import org.restlet.Response;
 import org.restlet.data.MediaType;
 import org.restlet.representation.Representation;
@@ -41,12 +43,15 @@ import org.restlet.representation.StringRepresentation;
 import org.restlet.representation.WriterRepresentation;
 import org.restlet.resource.ResourceException;
 
+import static org.restlet.data.MediaType.APPLICATION_JSON;
+import static org.restlet.data.MediaType.TEXT_HTML;
+
 /**
  * JAVADOC
  */
 public class ValueDescriptorResponseWriter extends AbstractResponseWriter
 {
-    private static final List<MediaType> supportedMediaTypes = Arrays.asList( MediaType.TEXT_HTML, MediaType.APPLICATION_JSON );
+    private static final List<MediaType> supportedMediaTypes = Arrays.asList( TEXT_HTML, APPLICATION_JSON );
 
     @Structure
     private ModuleDescriptor module;
@@ -61,36 +66,38 @@ public class ValueDescriptorResponseWriter extends AbstractResponseWriter
         if( result instanceof ValueDescriptor )
         {
             MediaType type = getVariant( response.getRequest(), ENGLISH, supportedMediaTypes ).getMediaType();
-            if( MediaType.APPLICATION_JSON.equals( type ) )
+            if( APPLICATION_JSON.equals( type ) )
             {
-                JSONObject json = new JSONObject();
                 ValueDescriptor vd = (ValueDescriptor) result;
-                vd.state().properties().forEach( propertyDescriptor -> {
-                    try
+                JsonObjectBuilder builder = Json.createObjectBuilder();
+                vd.state().properties().forEach(
+                    property ->
                     {
-                        Object o = propertyDescriptor.resolveInitialValue(module);
-                        if( o == null )
+                        try
                         {
-                            json.put( propertyDescriptor.qualifiedName().name(), JSONObject.NULL );
+                            Object o = property.resolveInitialValue( module );
+                            if( o == null )
+                            {
+                                builder.add( property.qualifiedName().name(), JsonValue.NULL );
+                            }
+                            else
+                            {
+                                builder.add( property.qualifiedName().name(), o.toString() );
+                            }
                         }
-                        else
+                        catch( JsonException ex )
                         {
-                            json.put( propertyDescriptor.qualifiedName().name(), o.toString() );
+                            throw new RestResponseException( "Unable to serialize " + vd, ex );
                         }
-                    }
-                    catch( JSONException e )
-                    {
-                        throw new RestResponseException( "Unable to serialize " + vd, e);
-                    }
-                } );
-                StringRepresentation representation
-                    = new StringRepresentation( json.toString(), MediaType.APPLICATION_JSON );
+                    } );
+                StringRepresentation representation = new StringRepresentation( builder.build().toString(),
+                                                                                APPLICATION_JSON );
                 response.setEntity( representation );
                 return true;
             }
-            else if( MediaType.TEXT_HTML.equals( type ) )
+            else if( TEXT_HTML.equals( type ) )
             {
-                Representation rep = new WriterRepresentation( MediaType.TEXT_HTML )
+                Representation rep = new WriterRepresentation( TEXT_HTML )
                 {
                     @Override
                     public void write( Writer writer )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/rest/build.gradle b/libraries/rest/build.gradle
index 8383383..6ca051d 100644
--- a/libraries/rest/build.gradle
+++ b/libraries/rest/build.gradle
@@ -27,8 +27,9 @@ jar { manifest { name = "Apache Polygene™ Library - REST" } }
 dependencies {
   compileOnly libraries.servlet_api
 
+  api libraries.restlet
+
   implementation polygene.extension( 'indexing-rdf' )
-  implementation libraries.restlet
   implementation libraries.sparql
   implementation libraries.velocity
 
@@ -36,7 +37,6 @@ dependencies {
 
   testImplementation polygene.core.testsupport
   testImplementation polygene.library( 'http' )
-  testImplementation polygene.extension( 'valueserialization-orgjson' )
   testImplementation libraries.http_client
 
   testRuntimeOnly libraries.logback

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
index b0eb71e..0b07b3e 100644
--- a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
+++ b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntitiesResource.java
@@ -22,6 +22,7 @@ package org.apache.polygene.library.rest.admin;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.io.Writer;
 import java.util.Arrays;
@@ -31,7 +32,7 @@ import java.util.stream.Stream;
 import org.apache.polygene.api.entity.EntityComposite;
 import org.apache.polygene.api.entity.EntityReference;
 import org.apache.polygene.api.injection.scope.Service;
-import org.apache.polygene.api.value.ValueSerialization;
+import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.spi.query.EntityFinder;
 import org.apache.polygene.spi.query.EntityFinderException;
 import org.restlet.data.CharacterSet;
@@ -64,7 +65,7 @@ public class EntitiesResource
     @Service
     private EntityFinder entityFinder;
     @Service
-    private ValueSerialization valueSerialization;
+    private Serialization stateSerialization;
 
     public EntitiesResource()
     {
@@ -117,7 +118,7 @@ public class EntitiesResource
                 public void write( OutputStream outputStream )
                     throws IOException
                 {
-                    valueSerialization.serialize( query, outputStream );
+                    stateSerialization.serialize( new OutputStreamWriter( outputStream ), query );
                 }
             };
         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
index cbdb34d..9eb3c17 100644
--- a/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
+++ b/libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/EntityResource.java
@@ -38,12 +38,11 @@ import org.apache.polygene.api.identity.StringIdentity;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.Uses;
+import org.apache.polygene.api.serialization.SerializationException;
 import org.apache.polygene.api.structure.ModuleDescriptor;
 import org.apache.polygene.api.time.SystemTime;
 import org.apache.polygene.api.usecase.Usecase;
 import org.apache.polygene.api.usecase.UsecaseBuilder;
-import org.apache.polygene.api.value.ValueSerialization;
-import org.apache.polygene.api.value.ValueSerializationException;
 import org.apache.polygene.library.rdf.entity.EntityStateSerializer;
 import org.apache.polygene.library.rdf.serializer.RdfXmlSerializer;
 import org.apache.polygene.spi.entity.EntityState;
@@ -54,6 +53,7 @@ import org.apache.polygene.spi.entitystore.EntityNotFoundException;
 import org.apache.polygene.spi.entitystore.EntityStore;
 import org.apache.polygene.spi.entitystore.EntityStoreUnitOfWork;
 import org.apache.polygene.spi.entitystore.helpers.JSONEntityState;
+import org.apache.polygene.spi.serialization.JsonSerialization;
 import org.openrdf.model.Statement;
 import org.openrdf.rio.RDFHandlerException;
 import org.restlet.data.CharacterSet;
@@ -79,7 +79,7 @@ public class EntityResource
     private EntityStore entityStore;
 
     @Service
-    private ValueSerialization valueSerialization;
+    private JsonSerialization serialization;
 
     @Structure
     private ModuleDescriptor module;
@@ -231,7 +231,7 @@ public class EntityResource
                                  + "type=\"text\" "
                                  + ( persistentProperty.isImmutable() ? "readonly=\"true\" " : "" )
                                  + "name=\"" + persistentProperty.qualifiedName() + "\" "
-                                 + "value=\"" + ( value == null ? "" : valueSerialization.serialize( value ) )
+                                 + "value=\"" + ( value == null ? "" : serialization.serialize( value ) )
                                  + "\"/></td></tr>" );
                 } );
                 out.println( "</table></fieldset>\n" );
@@ -308,6 +308,7 @@ public class EntityResource
 
     private Representation representJson( EntityState entityState )
     {
+        // TODO This guy needs to represent an Entity as JSON
         if( entityState instanceof JSONEntityState )
         {
             JSONEntityState jsonState = (JSONEntityState) entityState;
@@ -377,7 +378,7 @@ public class EntityResource
                     {
                         entity.setPropertyValue(
                             persistentProperty.qualifiedName(),
-                            valueSerialization.deserialize( module, persistentProperty.valueType(), formValue ) );
+                            serialization.deserialize( module, persistentProperty.valueType(), formValue ) );
                     }
                 }
             } );
@@ -503,7 +504,7 @@ public class EntityResource
                 }
             } );
         }
-        catch( ValueSerializationException | IllegalArgumentException e )
+        catch( SerializationException | IllegalArgumentException e )
         {
             throw new ResourceException( Status.SERVER_ERROR_INTERNAL, e );
         }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RDFAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RDFAssembler.java b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RDFAssembler.java
index f028d77..654f0d1 100644
--- a/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RDFAssembler.java
+++ b/libraries/rest/src/test/java/org/apache/polygene/library/rest/admin/RDFAssembler.java
@@ -26,7 +26,6 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.rdf.entity.EntityStateSerializer;
 import org.apache.polygene.library.rdf.entity.EntityTypeSerializer;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
 /**
  * JAVADOC
@@ -37,7 +36,6 @@ class RDFAssembler
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
-        new OrgJsonValueSerializationAssembler().assemble( module );
         module.objects( EntityStateSerializer.class ).visibleIn( Visibility.application );
         module.objects( EntityTypeSerializer.class ).visibleIn( Visibility.application );
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/restlet/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/restlet/build.gradle b/libraries/restlet/build.gradle
index ed8ca1a..95ab44b 100644
--- a/libraries/restlet/build.gradle
+++ b/libraries/restlet/build.gradle
@@ -30,9 +30,8 @@ dependencies {
 
   api polygene.core.bootstrap
 
-  implementation polygene.extension( 'valueserialization-jackson' )
-  implementation polygene.extension( 'indexing-rdf' )
   implementation polygene.extension( 'entitystore-file' )
+  implementation polygene.extension( 'indexing-rdf' )
   implementation libraries.restlet
 
   runtimeOnly polygene.core.runtime

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
index 21a2e0c..815691a 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/RestletCrudConnectivityAssembler.java
@@ -38,7 +38,6 @@ import org.apache.polygene.library.restlet.resource.EntryPointResource;
 import org.apache.polygene.library.restlet.resource.ResourceBuilder;
 import org.apache.polygene.library.restlet.serialization.FormRepresentation;
 import org.apache.polygene.library.restlet.serialization.JsonRepresentation;
-import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class RestletCrudConnectivityAssembler
     implements Assembler
@@ -65,6 +64,5 @@ public class RestletCrudConnectivityAssembler
                         PolygeneEntityRestlet.class )
             .visibleIn( Visibility.layer );
         module.services( ResourceBuilder.class ).visibleIn( Visibility.layer );
-        new JacksonValueSerializationAssembler().assemble( module );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
index e564c0d..1050e8a 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/configuration/ConfigurationModule.java
@@ -26,7 +26,6 @@ import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class ConfigurationModule
     implements ModuleAssembler
@@ -37,7 +36,6 @@ public class ConfigurationModule
         throws AssemblyException
     {
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.layer );
-        new JacksonValueSerializationAssembler().visibleIn( Visibility.layer ).assemble( module );
         return module;
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
index 77d1166..275cb27 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/assembly/infrastructue/SerializationModule.java
@@ -20,12 +20,10 @@
 
 package org.apache.polygene.library.restlet.assembly.infrastructue;
 
-import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.valueserialization.jackson.assembly.JacksonValueSerializationAssembler;
 
 public class SerializationModule
     implements ModuleAssembler
@@ -36,9 +34,6 @@ public class SerializationModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        new JacksonValueSerializationAssembler()
-            .visibleIn( Visibility.layer )
-            .assemble( module );
         return module;
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
----------------------------------------------------------------------
diff --git a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
index 74acdf8..ea0929b 100644
--- a/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
+++ b/libraries/restlet/src/main/java/org/apache/polygene/library/restlet/serialization/JsonRepresentation.java
@@ -21,14 +21,15 @@
 package org.apache.polygene.library.restlet.serialization;
 
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.injection.scope.Service;
 import org.apache.polygene.api.injection.scope.Structure;
 import org.apache.polygene.api.injection.scope.Uses;
+import org.apache.polygene.api.serialization.Serialization;
 import org.apache.polygene.api.structure.ModuleDescriptor;
-import org.apache.polygene.api.value.ValueSerialization;
-import org.apache.polygene.api.value.ValueSerializer;
 import org.apache.polygene.spi.PolygeneSPI;
 import org.restlet.data.MediaType;
 import org.restlet.representation.OutputRepresentation;
@@ -42,13 +43,11 @@ import org.restlet.representation.Representation;
 public class JsonRepresentation<T> extends OutputRepresentation
 {
 
-    private static final ValueSerializer.Options OPTIONS_NO_TYPE = new ValueSerializer.Options().withoutTypeInfo().withMapEntriesAsObjects();
-
     @Structure
     private PolygeneSPI spi;
 
     @Service
-    private ValueSerialization serializer;
+    private Serialization stateSerialization;
 
     @Structure
     private ModuleDescriptor module;
@@ -98,7 +97,8 @@ public class JsonRepresentation<T> extends OutputRepresentation
         }
         else if( this.representation != null )
         {
-            result = serializer.deserialize( module, objectClass, this.representation.getStream() );
+            result = stateSerialization.deserialize( module, objectClass,
+                                                     new InputStreamReader( this.representation.getStream() ) );
         }
         return result;
     }
@@ -123,7 +123,8 @@ public class JsonRepresentation<T> extends OutputRepresentation
         }
         else if( object != null )
         {
-            serializer.serialize( OPTIONS_NO_TYPE, object, outputStream );
+            // TODO was WITHOUT TYPE INFO
+            stateSerialization.serialize( new OutputStreamWriter( outputStream ), object );
             outputStream.write( '\n' );
         }
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/sql-liquibase/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql-liquibase/build.gradle b/libraries/sql-liquibase/build.gradle
index ffedb52..4d94e30 100644
--- a/libraries/sql-liquibase/build.gradle
+++ b/libraries/sql-liquibase/build.gradle
@@ -34,6 +34,7 @@ dependencies {
 
   testImplementation polygene.core.testsupport
   testImplementation polygene.library( 'sql-dbcp' )
+  testImplementation libraries.jooq
 
   testRuntimeOnly libraries.derby
   testRuntimeOnly libraries.logback

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/sql-liquibase/src/test/java/org/apache/polygene/library/sql/liquibase/LiquibaseServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/sql-liquibase/src/test/java/org/apache/polygene/library/sql/liquibase/LiquibaseServiceTest.java b/libraries/sql-liquibase/src/test/java/org/apache/polygene/library/sql/liquibase/LiquibaseServiceTest.java
index 807990d..108a187 100644
--- a/libraries/sql-liquibase/src/test/java/org/apache/polygene/library/sql/liquibase/LiquibaseServiceTest.java
+++ b/libraries/sql-liquibase/src/test/java/org/apache/polygene/library/sql/liquibase/LiquibaseServiceTest.java
@@ -20,14 +20,10 @@
 package org.apache.polygene.library.sql.liquibase;
 
 import java.io.IOException;
-import java.sql.ResultSet;
 import java.sql.SQLException;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.function.Function;
 import javax.sql.DataSource;
-import org.apache.polygene.api.activation.ActivationEvent;
-import org.apache.polygene.api.activation.ActivationEventListener;
 import org.apache.polygene.api.activation.ActivationException;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.property.Property;
@@ -39,13 +35,22 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.SingletonAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
-import org.apache.polygene.library.sql.common.Databases;
-import org.apache.polygene.library.sql.common.SQLUtil;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
+import org.jooq.DSLContext;
+import org.jooq.Field;
+import org.jooq.InsertValuesStep2;
+import org.jooq.Record;
+import org.jooq.SQLDialect;
+import org.jooq.Table;
+import org.jooq.impl.DSL;
 import org.junit.Test;
 
+import static java.util.stream.Collectors.toList;
 import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.jooq.impl.DSL.field;
+import static org.jooq.impl.DSL.table;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
@@ -68,23 +73,23 @@ public class LiquibaseServiceTest
                 // Create in-memory store for configurations
                 new EntityTestAssembler().assemble( configModule );
 
-                new DBCPDataSourceServiceAssembler().
-                    identifiedBy( "datasource-service" ).
-                    withConfig( configModule, Visibility.layer ).
-                    assemble( module );
-                new DataSourceAssembler().
-                    withDataSourceServiceIdentity( "datasource-service" ).
-                    identifiedBy( "testds-liquibase" ).
-                    withCircuitBreaker().
-                    assemble( module );
+                new DBCPDataSourceServiceAssembler()
+                    .identifiedBy( "datasource-service" )
+                    .withConfig( configModule, Visibility.layer )
+                    .assemble( module );
+                new DataSourceAssembler()
+                    .withDataSourceServiceIdentity( "datasource-service" )
+                    .identifiedBy( "testds-liquibase" )
+                    .withCircuitBreaker()
+                    .assemble( module );
 
                 module.values( SomeValue.class );
 
                 // Set up Liquibase service that will create the tables
                 // START SNIPPET: assembly
-                new LiquibaseAssembler().
-                    withConfig( configModule, Visibility.layer ).
-                    assemble( module );
+                new LiquibaseAssembler()
+                    .withConfig( configModule, Visibility.layer )
+                    .assemble( module );
                 // END SNIPPET: assembly
                 module.forMixin( LiquibaseConfiguration.class ).declareDefaults().enabled().set( true );
                 module.forMixin( LiquibaseConfiguration.class ).declareDefaults().changeLog().set( "changelog.xml" );
@@ -93,78 +98,48 @@ public class LiquibaseServiceTest
             @Override
             public void beforeActivation( Application application )
             {
-                application.registerActivationEventListener( new ActivationEventListener()
-                {
-
-                    @Override
-                    public void onEvent( ActivationEvent event )
-                    {
-                        System.out.println( event );
-                    }
-
-                } );
+                application.registerActivationEventListener( System.out::println );
             }
-
         };
 
         Module module = assembler.module();
 
-        // START SNIPPET: io
         // Look up the DataSource
         DataSource ds = module.findService( DataSource.class ).get();
 
-        // Instanciate Databases helper
-        Databases database = new Databases( ds );
+        // Prepare jOOQ and the schema model
+        DSLContext jooq = DSL.using( ds, SQLDialect.DERBY );
+        Table<Record> testTable = table( "TEST" );
+        Field<String> idColumn = field( "ID", String.class );
+        Field<String> fooColumn = field( "FOO", String.class );
 
         // Assert that insertion works
-        assertTrue( database.update( "insert into test values ('someid', 'bar')" ) == 1 );
-        // END SNIPPET: io
-
-        database.query( "select * from test", new Databases.ResultSetVisitor()
-        {
-            @Override
-            public boolean visit( ResultSet visited )
-                throws SQLException
-            {
-                assertThat( visited.getString( "id" ), equalTo( "someid" ) );
-                assertThat( visited.getString( "foo" ), equalTo( "bar" ) );
+        InsertValuesStep2 insert = jooq.insertInto( testTable )
+                                       .columns( idColumn, fooColumn )
+                                       .values( "someid", "bar" );
+        assertTrue( insert.execute() == 1 );
 
-                return true;
-            }
-        } );
+        List<Record> records = jooq.selectFrom( testTable ).stream().collect( toList() );
+        assertThat( records.size(), is( 1 ) );
+        assertThat( records.get( 0 ).get( idColumn ), equalTo( "someid" ) );
+        assertThat( records.get( 0 ).get( fooColumn ), equalTo( "bar" ) );
 
-        Function<ResultSet, SomeValue> toValue = new Function<ResultSet, SomeValue>()
+        Function<Record, SomeValue> toValue = record ->
         {
-            @Override
-            public SomeValue apply( ResultSet resultSet )
-            {
-                ValueBuilder<SomeValue> builder = assembler.module().newValueBuilder( SomeValue.class );
-                try
-                {
-                    builder.prototype().id().set( resultSet.getString( "id" ) );
-                    builder.prototype().foo().set( resultSet.getString( "foo" ) );
-                }
-                catch( SQLException e )
-                {
-                    throw new IllegalArgumentException( "Could not convert to SomeValue",
-                                                        SQLUtil.withAllSQLExceptions( e ) );
-                }
-
-                return builder.newInstance();
-            }
+            ValueBuilder<SomeValue> builder = assembler.module().newValueBuilder( SomeValue.class );
+            builder.prototype().id().set( record.get( idColumn ) );
+            builder.prototype().foo().set( record.get( fooColumn ) );
+            return builder.newInstance();
         };
 
-        List<SomeValue> rows = new ArrayList<SomeValue>();
-        database.query( "select * from test", new Databases.ResultSetVisitor() {
-            @Override
-            public boolean visit( final ResultSet resultSet ) throws SQLException
-            {
-                rows.add( toValue.apply( resultSet ) );
-                return true;
-            }
-        } );
+        List<SomeValue> values = jooq.selectFrom( testTable ).stream()
+                                     .map( toValue )
+                                     .peek( System.out::println )
+                                     .collect( toList() );
 
-        rows.forEach( System.out::println );
+        assertThat( values.size(), is( 1 ) );
+        assertThat( values.get( 0 ).id().get(), equalTo( "someid" ) );
+        assertThat( values.get( 0 ).foo().get(), equalTo( "bar" ) );
     }
 
     interface SomeValue
@@ -174,5 +149,4 @@ public class LiquibaseServiceTest
 
         Property<String> foo();
     }
-
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/sql/src/main/java/org/apache/polygene/library/sql/common/Databases.java
----------------------------------------------------------------------
diff --git a/libraries/sql/src/main/java/org/apache/polygene/library/sql/common/Databases.java b/libraries/sql/src/main/java/org/apache/polygene/library/sql/common/Databases.java
index ebed162..7710444 100644
--- a/libraries/sql/src/main/java/org/apache/polygene/library/sql/common/Databases.java
+++ b/libraries/sql/src/main/java/org/apache/polygene/library/sql/common/Databases.java
@@ -29,6 +29,7 @@ import org.apache.polygene.api.util.Visitor;
 /**
  * Utility methods for performing SQL calls wrapping a given DataSource.
  */
+// TODO Remove me!
 public class Databases
 {
     DataSource source;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/internal/ConcurrentUoWFileModificationException.java
----------------------------------------------------------------------
diff --git a/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/internal/ConcurrentUoWFileModificationException.java b/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/internal/ConcurrentUoWFileModificationException.java
index b604702..b27c067 100644
--- a/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/internal/ConcurrentUoWFileModificationException.java
+++ b/libraries/uowfile/src/main/java/org/apache/polygene/library/uowfile/internal/ConcurrentUoWFileModificationException.java
@@ -32,7 +32,7 @@ public class ConcurrentUoWFileModificationException
 
     ConcurrentUoWFileModificationException( Iterable<UoWFile> concurrentlyModifiedFiles, Usecase usecase )
     {
-        super( Collections.<EntityComposite,HasTypes>emptyMap(), usecase );
+        super( Collections.emptyMap(), usecase );
         this.concurrentlyModifiedFiles = concurrentlyModifiedFiles;
     }
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/manual/src/docs/userguide/extensions.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/userguide/extensions.txt b/manual/src/docs/userguide/extensions.txt
index 524fec2..42f216e 100644
--- a/manual/src/docs/userguide/extensions.txt
+++ b/manual/src/docs/userguide/extensions.txt
@@ -28,7 +28,7 @@ We try to keep the Polygene™ Core Runtime as lean as possible, and a lot of th
 Extension SPI, which defines clear ways to extend the platform. There are currently the following Extensions types,
 each with possibly more than one implementation;
 
-   * Value Serialization
+   * Serialization
    * Entity Stores
    * Index / Query Engines
    * Entity Caches
@@ -45,23 +45,15 @@ for our users.
 
 :leveloffset: 2
 
-include::../../../../extensions/valueserialization-orgjson/src/docs/vs-orgjson.txt[]
+include::../../../../extensions/serialization-javaxjson/src/docs/serialization-javaxjson.txt[]
 
 :leveloffset: 2
 
-include::../../../../extensions/valueserialization-jackson/src/docs/vs-jackson.txt[]
+include::../../../../extensions/serialization-javaxxml/src/docs/serialization-javaxxml.txt[]
 
 :leveloffset: 2
 
-include::../../../../extensions/valueserialization-stax/src/docs/vs-stax.txt[]
-
-:leveloffset: 2
-
-include::../../../../extensions/cache-ehcache/src/docs/cache-ehcache.txt[]
-
-:leveloffset: 2
-
-include::../../../../extensions/cache-memcache/src/docs/cache-memcache.txt[]
+include::../../../../extensions/serialization-msgpack/src/docs/serialization-msgpack.txt[]
 
 :leveloffset: 2
 
@@ -113,6 +105,14 @@ include::../../../../extensions/entitystore-sql/src/docs/es-sql.txt[]
 
 :leveloffset: 2
 
+include::../../../../extensions/cache-ehcache/src/docs/cache-ehcache.txt[]
+
+:leveloffset: 2
+
+include::../../../../extensions/cache-memcache/src/docs/cache-memcache.txt[]
+
+:leveloffset: 2
+
 include::../../../../extensions/indexing-elasticsearch/src/docs/index-elasticsearch.txt[]
 
 :leveloffset: 2

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/samples/forum/build.gradle
----------------------------------------------------------------------
diff --git a/samples/forum/build.gradle b/samples/forum/build.gradle
index be78ca2..f11dcfe 100644
--- a/samples/forum/build.gradle
+++ b/samples/forum/build.gradle
@@ -29,7 +29,6 @@ dependencies {
   implementation polygene.core.bootstrap
   implementation polygene.library( 'rest-server' )
   implementation polygene.library( 'fileconfig' )
-  implementation polygene.extension( 'valueserialization-orgjson' )
   implementation polygene.extension( 'entitystore-memory' )
   implementation polygene.extension( 'entitystore-file' )
   implementation polygene.extension( 'indexing-rdf' )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
----------------------------------------------------------------------
diff --git a/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java b/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
index e3435b1..5f3b0cc 100644
--- a/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
+++ b/samples/forum/src/main/java/org/apache/polygene/sample/forum/assembler/ForumAssembler.java
@@ -50,7 +50,6 @@ import org.apache.polygene.sample.forum.domainevent.ParameterValue;
 import org.apache.polygene.sample.forum.rest.ForumRestlet;
 import org.apache.polygene.sample.forum.rest.resource.RootResource;
 import org.apache.polygene.sample.forum.service.BootstrapData;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 import org.restlet.service.MetadataService;
 
 import static java.util.stream.Collectors.toList;
@@ -75,18 +74,12 @@ public class ForumAssembler
         LayerAssembly configuration = assembly.layer( "Configuration" );
         {
             configModule = configuration.module( "Configuration" );
-            new OrgJsonValueSerializationAssembler().assemble( configModule );
             new MemoryEntityStoreAssembler().assemble( configModule );
             new FileConfigurationAssembler().visibleIn( Visibility.application ).assemble( configModule );
         }
 
         LayerAssembly infrastructure = assembly.layer( "Infrastructure" ).uses( configuration );
         {
-            ModuleAssembly serialization = infrastructure.module( "Serialization" );
-            new OrgJsonValueSerializationAssembler().
-                visibleIn( Visibility.application ).
-                assemble( serialization );
-
             ModuleAssembly entityStore = infrastructure.module( "EntityStore" );
             new FileEntityStoreAssembler()
                 .visibleIn( Visibility.application )
@@ -133,8 +126,8 @@ public class ForumAssembler
             contexts.services( EventsService.class );
 
             context.module( "Domain events" )
-                .values( DomainEventValue.class, ParameterValue.class )
-                .visibleIn( Visibility.application );
+                   .values( DomainEventValue.class, ParameterValue.class )
+                   .visibleIn( Visibility.application );
         }
 
         LayerAssembly services = assembly.layer( "Service" ).uses( data );
@@ -154,12 +147,12 @@ public class ForumAssembler
             {
                 new RestServerAssembler().assemble( transformation );
                 transformation.objects( RequestReaderDelegator.class, ResponseWriterDelegator.class )
-                    .visibleIn( Visibility.layer );
-                new OrgJsonValueSerializationAssembler().assemble( transformation );
+                              .visibleIn( Visibility.layer );
             }
 
             ModuleAssembly resources = rest.module( "Resources" );
-            List<? extends Class<?>> resourceClasses = ClassScanner.findClasses( RootResource.class ).collect( toList() );
+            List<? extends Class<?>> resourceClasses = ClassScanner.findClasses( RootResource.class )
+                                                                   .collect( toList() );
             for( Class<?> resourceClass : resourceClasses )
             {
                 resources.objects( resourceClass ).visibleIn( Visibility.layer );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/samples/rental/build.gradle
----------------------------------------------------------------------
diff --git a/samples/rental/build.gradle b/samples/rental/build.gradle
index 1f083e4..31c502c 100644
--- a/samples/rental/build.gradle
+++ b/samples/rental/build.gradle
@@ -33,7 +33,6 @@ jar { manifest { name = "Apache Polygene™ Sample - Car Rental" } }
 
 dependencies {
   implementation polygene.core.bootstrap
-  implementation polygene.extension( 'valueserialization-orgjson' )
 
   providedCompile libraries.servlet_api
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
----------------------------------------------------------------------
diff --git a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
index 7fd88ab..a7ca995 100644
--- a/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
+++ b/samples/rental/src/main/java/org/apache/polygene/sample/rental/web/assembly/StorageModule.java
@@ -24,19 +24,14 @@ import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
 public class StorageModule
     implements Assembler
 {
-
     @Override
     public void assemble( ModuleAssembly module )
         throws AssemblyException
     {
         module.services( MemoryEntityStoreService.class ).visibleIn( Visibility.application );
-        new OrgJsonValueSerializationAssembler().
-            visibleIn( Visibility.application ).
-            assemble( module );
     }
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
----------------------------------------------------------------------
diff --git a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
index c6c7624..9c9fee6 100644
--- a/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
+++ b/samples/sql-support/src/main/java/org/apache/polygene/sample/sqlsupport/AppAssembler.java
@@ -20,7 +20,6 @@
 package org.apache.polygene.sample.sqlsupport;
 
 import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.api.value.ValueSerialization;
 import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
@@ -33,7 +32,6 @@ import org.apache.polygene.index.sql.assembly.PostgreSQLIndexQueryAssembler;
 import org.apache.polygene.library.sql.assembly.DataSourceAssembler;
 import org.apache.polygene.library.sql.datasource.DataSources;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationService;
 
 /**
  * Assemble the Application.
@@ -56,8 +54,6 @@ public class AppAssembler
         LayerAssembly configLayer = appAss.layer( "config" );
         ModuleAssembly configModule = configLayer.module( "config" );
         {
-            configModule.services( OrgJsonValueSerializationService.class ).
-                taggedWith( ValueSerialization.Formats.JSON );
             configModule.services( MemoryEntityStoreService.class ).
                 visibleIn( Visibility.module );
             // Use a PreferenceEntityStore instead if you want the configuration to be persistent
@@ -68,9 +64,6 @@ public class AppAssembler
         LayerAssembly infraLayer = appAss.layer( "infra" );
         ModuleAssembly persistenceModule = infraLayer.module( "persistence" );
         {
-            persistenceModule.services( OrgJsonValueSerializationService.class ).
-                taggedWith( ValueSerialization.Formats.JSON );
-
             // SQL DataSource Service
             String dataSourceServiceIdentity = "postgresql-datasource-service";
             new DBCPDataSourceServiceAssembler().

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index f33d3eb..e0b6b7d 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -76,9 +76,9 @@ include 'core:api',
         'extensions:metrics-codahale',
         'extensions:migration',
         'extensions:reindexer',
-        'extensions:valueserialization-orgjson',
-        'extensions:valueserialization-jackson',
-        'extensions:valueserialization-stax',
+        'extensions:serialization-javaxjson',
+        'extensions:serialization-javaxxml',
+        'extensions:serialization-msgpack',
         'tools:model-detail',
         'tools:envisage',
 //        'tools:generator-polygene',

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/tests/performance/build.gradle
----------------------------------------------------------------------
diff --git a/tests/performance/build.gradle b/tests/performance/build.gradle
index aeb44ec..1ff9b45 100644
--- a/tests/performance/build.gradle
+++ b/tests/performance/build.gradle
@@ -32,7 +32,6 @@ dependencies {
 
   perfImplementation polygene.core.testsupport
   perfImplementation polygene.library( 'sql-dbcp' )
-  perfImplementation polygene.extension( 'valueserialization-orgjson' )
   perfImplementation polygene.extension( 'entitystore-memory' )
   perfImplementation polygene.extension( 'entitystore-jdbm' )
   perfImplementation polygene.extension( 'entitystore-sql' )

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
index 047ffef..006cf85 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/jdbm/JdbmEntityStorePerformanceTest.java
@@ -29,7 +29,6 @@ import org.apache.polygene.entitystore.jdbm.JdbmConfiguration;
 import org.apache.polygene.entitystore.jdbm.assembly.JdbmEntityStoreAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.performance.entitystore.AbstractEntityStorePerformanceTest;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
 /**
  * Performance test for JdbmEntityStoreComposite
@@ -51,7 +50,6 @@ public class JdbmEntityStorePerformanceTest
                 throws AssemblyException
             {
                 new JdbmEntityStoreAssembler().assemble( module );
-                new OrgJsonValueSerializationAssembler().assemble( module );
                 ModuleAssembly configModule = module.layer().module( "Config" );
                 configModule.entities( JdbmConfiguration.class ).visibleIn( Visibility.layer );
                 new EntityTestAssembler().assemble( configModule );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
index bd664e1..956cc7a 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/memory/MemoryEntityStorePerformanceTest.java
@@ -21,11 +21,10 @@ import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.bootstrap.Assembler;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.memory.assembly.MemoryEntityStoreAssembler;
 import org.apache.polygene.entitystore.memory.MemoryEntityStoreService;
+import org.apache.polygene.entitystore.memory.assembly.MemoryEntityStoreAssembler;
 import org.apache.polygene.spi.entitystore.helpers.MapEntityStoreMixin;
 import org.apache.polygene.test.performance.entitystore.AbstractEntityStorePerformanceTest;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
 public class MemoryEntityStorePerformanceTest
     extends AbstractEntityStorePerformanceTest
@@ -45,7 +44,6 @@ public class MemoryEntityStorePerformanceTest
                 throws AssemblyException
             {
                 new MemoryEntityStoreAssembler().assemble( module );
-                new OrgJsonValueSerializationAssembler().assemble( module );
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
index d1ea720..5906307 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/entitystore/sql/DerbySQLEntityStorePerformanceTest.java
@@ -34,7 +34,6 @@ import org.apache.polygene.library.sql.common.SQLUtil;
 import org.apache.polygene.library.sql.dbcp.DBCPDataSourceServiceAssembler;
 import org.apache.polygene.test.EntityTestAssembler;
 import org.apache.polygene.test.performance.entitystore.AbstractEntityStorePerformanceTest;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
 /**
  * Performance test for DerbySQLEntityStore.
@@ -59,8 +58,6 @@ public class DerbySQLEntityStorePerformanceTest
                 ModuleAssembly config = module.layer().module( "config" );
                 new EntityTestAssembler().assemble( config );
 
-                new OrgJsonValueSerializationAssembler().assemble( module );
-
                 // DataSourceService
                 new DBCPDataSourceServiceAssembler().
                     identifiedBy( "derby-datasource-service" ).

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
----------------------------------------------------------------------
diff --git a/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java b/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
index a8e54ee..c83356a 100644
--- a/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
+++ b/tests/performance/src/perf/java/org/apache/polygene/test/performance/indexing/rdf/QueryPerformanceTest.java
@@ -19,12 +19,6 @@ package org.apache.polygene.test.performance.indexing.rdf;
 
 import java.io.File;
 import org.apache.derby.iapi.services.io.FileUtil;
-import org.apache.polygene.api.query.QueryBuilderFactory;
-import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
 import org.apache.polygene.api.common.Visibility;
 import org.apache.polygene.api.entity.EntityBuilder;
 import org.apache.polygene.api.entity.EntityComposite;
@@ -33,12 +27,14 @@ import org.apache.polygene.api.mixin.Mixins;
 import org.apache.polygene.api.property.Property;
 import org.apache.polygene.api.query.Query;
 import org.apache.polygene.api.query.QueryBuilder;
+import org.apache.polygene.api.query.QueryBuilderFactory;
 import org.apache.polygene.api.service.ServiceComposite;
 import org.apache.polygene.api.service.ServiceReference;
 import org.apache.polygene.api.structure.Application;
 import org.apache.polygene.api.structure.Module;
 import org.apache.polygene.api.unitofwork.UnitOfWork;
 import org.apache.polygene.api.unitofwork.UnitOfWorkCompletionException;
+import org.apache.polygene.api.unitofwork.UnitOfWorkFactory;
 import org.apache.polygene.bootstrap.ApplicationAssembler;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
@@ -52,7 +48,10 @@ import org.apache.polygene.index.rdf.indexing.RdfIndexingService;
 import org.apache.polygene.index.rdf.query.SesameExpressions;
 import org.apache.polygene.library.rdf.repository.NativeConfiguration;
 import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.apache.polygene.api.query.QueryExpressions.eq;
 import static org.apache.polygene.api.query.QueryExpressions.templateFor;
@@ -300,7 +299,6 @@ public class QueryPerformanceTest
         new RdfNativeSesameStoreAssembler().assemble( persistenceModule );
 
         // Entity store
-        new OrgJsonValueSerializationAssembler().assemble( persistenceModule );
         new MemoryEntityStoreAssembler().visibleIn( Visibility.application ).assemble( persistenceModule );
 
         return infrastructureLayer;

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/c9dd7229/tools/generator-polygene/app/index.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/index.js b/tools/generator-polygene/app/index.js
index b1a12c1..a0631e5 100644
--- a/tools/generator-polygene/app/index.js
+++ b/tools/generator-polygene/app/index.js
@@ -151,9 +151,8 @@ module.exports = generators.Base.extend(
                             type: 'list',
                             name: 'serialization',
                             choices: [
-                                'Jackson',
-                                // 'Johnzon',
-                                'Stax'
+                                'JavaxJson',
+                                'JavaxXml'
                             ],
                             message: 'Which serialization system do you want to use?',
                             default: polygene.serialization ? polygene.serialization : "Jackson"


Mime
View raw message