Contact standard fields like First Name, Last Name and Email Address have been set via java and integrated using Rest API.
.NET code is below:
var customObject = new CustomObject
{
id = -10001,
name = "Disruption",
fields = new List<CustomObjectField>
{
new CustomObjectField
{
name = "FlightNumber",
dataType = Enum.GetName(typeof(DataType), DataType.text),
type = "CustomObjectField"
},
new CustomObjectField
{
name = "FlightDate",
dataType = Enum.GetName(typeof(DataType), DataType.text),
type = "CustomObjectField"
},
new CustomObjectField
{
name = "DisruptionType",
dataType = Enum.GetName(typeof(DataType), DataType.text),
type = "CustomObjectField"
},
new CustomObjectField
{
name = "EmailAddress",
dataType = Enum.GetName(typeof(DataType), DataType.text),
type = "CustomObjectField"
}
}
};
Just create a class representing your data with Java (using ArrayList for JSON arrays):
For your field:
public class customObjectField {
private String FlightNumber;
private String FlightDate;
...
}
For your object:
public class customObject {
private int id;
private String name;
private arrayList<customObjectField> fields;
}
Instantiate then serialize with gson. Then post the String.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.