Package com.amazonaws.util.json

Examples of com.amazonaws.util.json.JSONWriter.object()


    }

    try {
      StringWriter stringWriter = new StringWriter();
      JSONWriter jsonWriter = new JSONWriter(stringWriter);
      jsonWriter.object();

      TableDescription table = describeTableResult.getTable();
      if (table != null) {
        jsonWriter.key("Table").object();
        jsonWriter.key("ItemCount").value(table.getItemCount());
View Full Code Here


        jsonWriter.key("CreationDateTime").value(table.getCreationDateTime());
        List<AttributeDefinition> attributes = table.getAttributeDefinitions();
        if (attributes != null) {
          jsonWriter.key("AttributeDefinitions").array();
                    for (AttributeDefinition attr : attributes) {
            jsonWriter.object();
            if (attr.getAttributeName() != null) {
              jsonWriter.key("AttributeName").value(attr.getAttributeName());
            }
            if (attr.getAttributeType() != null) {
              jsonWriter.key("AttributeType").value(attr.getAttributeType());
View Full Code Here

        List<KeySchemaElement> keySchema = table.getKeySchema();
        if (keySchema != null) {
          jsonWriter.key("KeySchema").array();
                    for (KeySchemaElement element : keySchema) {
            jsonWriter.object();
            if (element.getAttributeName() != null) {
              jsonWriter.key("AttributeName").value(element.getAttributeName());
            }
            if (element.getKeyType() != null) {
              jsonWriter.key("KeyType").value(element.getKeyType());
View Full Code Here

    }

    try {
      StringWriter stringWriter = new StringWriter();
      JSONWriter jsonWriter = new JSONWriter(stringWriter);
      jsonWriter.object();

      TableDescription table = describeTableResult.getTableDescription();
      if (table != null) {
        jsonWriter.key("TableDescription").object();
        jsonWriter.key("TableName").value(table.getTableName());
View Full Code Here

        jsonWriter.key("CreationDateTime").value(table.getCreationDateTime());
        List<AttributeDefinition> attributes = table.getAttributeDefinitions();
        if (attributes != null) {
          jsonWriter.key("AttributeDefinitions").array();
                    for (AttributeDefinition attr : attributes) {
            jsonWriter.object();
            if (attr.getAttributeName() != null) {
              jsonWriter.key("AttributeName").value(attr.getAttributeName());
            }
            if (attr.getAttributeType() != null) {
              jsonWriter.key("AttributeType").value(attr.getAttributeType());
View Full Code Here

        }
        List<KeySchemaElement> keySchema = table.getKeySchema();
        if (keySchema != null) {
          jsonWriter.key("KeySchema").array();
                    for (KeySchemaElement element : keySchema) {
            jsonWriter.object();
            if (element.getAttributeName() != null) {
              jsonWriter.key("AttributeName").value(element.getAttributeName());
            }
            if (element.getKeyType() != null) {
              jsonWriter.key("KeyType").value(element.getKeyType());
View Full Code Here

    }

    try {
      StringWriter stringWriter = new StringWriter();
      JSONWriter jsonWriter = new JSONWriter(stringWriter);
      jsonWriter.object();

      if (queryResult.getCount() != null) {
        jsonWriter.key("Count").value(queryResult.getCount());
      }
      if (queryResult.getItems() != null) {
View Full Code Here

        jsonWriter.key("Count").value(queryResult.getCount());
      }
      if (queryResult.getItems() != null) {
        jsonWriter.key("Items").array();
        for (Map<String, AttributeValue> value : queryResult.getItems()) {
          jsonWriter.object();
          for (Map.Entry<String, AttributeValue> item : value.entrySet()) {
            String key = item.getKey();
            AttributeValue val = item.getValue();
            jsonWriter.key(key).object();
            if (val.getN() != null) {
View Full Code Here

    }

    try {
      StringWriter stringWriter = new StringWriter();
      JSONWriter jsonWriter = new JSONWriter(stringWriter);
      jsonWriter.object();

      TableDescription table = deleteTableResult.getTableDescription();
      if (table != null) {
        jsonWriter.key("TableDescription").object();
        jsonWriter.key("TableName").value(table.getTableName());
View Full Code Here

      throw new AmazonClientException("Invalid argument passed to marshall(...)");
    }
    try {
      StringWriter stringWriter = new StringWriter();
      JSONWriter jsonWriter = new JSONWriter(stringWriter);
      jsonWriter.object();
      jsonWriter.key("Attributes").object();
      for (String key : updateItemResult.getAttributes().keySet()) {
        jsonWriter.key(key).object();
        if (updateItemResult.getAttributes().get(key) != null) {
          if (updateItemResult.getAttributes().get(key).getS() != null) {
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.