Package com.linkedin.data.schema

Examples of com.linkedin.data.schema.JsonBuilder.result()


    jsonBuilder.writeEndObject();

    try
    {
      fileOutputStream.write(jsonBuilder.result().getBytes());
    }
    finally
    {
      fileOutputStream.close();
      jsonBuilder.close();
View Full Code Here


    try
    {
      builder = new JsonBuilder(JsonBuilder.Pretty.SPACES);
      final SchemaToJsonEncoder encoder = new NamedSchemaReferencingJsonEncoder(builder);
      encoder.encode(schema);
      return builder.result();
    }
    catch (IOException e)
    {
      throw new RestLiInternalException("could not encode schema for '" + schema.toString() "'", e);
    }
View Full Code Here

    try
    {
      builder = new JsonBuilder(JsonBuilder.Pretty.SPACES);
      final SchemaToJsonEncoder encoder = new NamedSchemaReferencingJsonEncoder(builder);
      encoder.encode(schemaToEncode);
      return builder.result();
    }
    catch (IOException e)
    {
      throw new RestLiInternalException("could not encode schema for '" + type.getName() + "'", e);
    }
View Full Code Here

    try
    {
      builder = new JsonBuilder(options.getPretty());
      final SchemaToAvroJsonEncoder serializer = new SchemaToAvroJsonEncoder(builder, schema, fieldDefaultValueProvider, options);
      serializer.encode(schema);
      return builder.result();
    }
    catch (IOException exc)
    {
      throw new IllegalStateException(exc);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.