wro4j-extensions/src/main/java/ro/isdc/wro/extensions/http/handler/ResourceSerializer.java
@Override
  public JsonElement serialize(final Resource resource, final Type type, final JsonSerializationContext context) {
    final JsonObject jsonObject = new JsonObject();
    final String uri = resource.getUri();
    jsonObject.add("type", new JsonPrimitive(resource.getType().toString()));
    jsonObject.add("minimize", new JsonPrimitive(resource.isMinimize()));
    jsonObject.add("uri", new JsonPrimitive(uri));
    jsonObject.add("proxyUri", new JsonPrimitive(getExternalUri(uri)));
    return jsonObject;
  }
@Override
  public JsonElement serialize(final Resource resource, final Type type, final JsonSerializationContext context) {
    final JsonObject jsonObject = new JsonObject();
    final String uri = resource.getUri();
    jsonObject.add("type", new JsonPrimitive(resource.getType().toString()));
    jsonObject.add("minimize", new JsonPrimitive(resource.isMinimize()));
    jsonObject.add("uri", new JsonPrimitive(uri));
    jsonObject.add("proxyUri", new JsonPrimitive(getExternalUri(uri)));
    return jsonObject;
  }
@ Override public JsonElement serialize ( final Resource resource , final Type type , final JsonSerializationContext context ) { final JsonObject jsonObject = new JsonObject ( ) ; final String uri = resource . getUri ( ) ; jsonObject . add ( "type" , new JsonPrimitive ( resource . getType ( ) . toString ( ) ) ) ; jsonObject . add ( "minimize" , new JsonPrimitive ( resource . isMinimize ( ) ) ) ; jsonObject . add ( "uri" , new JsonPrimitive ( uri ) ) ; jsonObject . add ( "proxyUri" , new JsonPrimitive ( getExternalUri ( uri ) ) ) ; return jsonObject ; }
{@inheritDoc}
{