Skip to content

ApiServiceRecipesDataModel

pozil edited this page Nov 14, 2024 · 15 revisions

ApiServiceRecipesDataModel Class

This class contains the 'data transfer object' details. Data transfer objects are used to serialize Apex objects to JSON and web service response JSON to Apex objects.

Group Integration Recipes

See ApiServiceRecipes

Fields

exampleArray

These properties represent the JSON keys that we need to send or receive.

Signature

public exampleArray

Type

List<Integer>


exampleBoolean

Signature

public exampleBoolean

Type

Boolean


exampleColor

Signature

public exampleColor

Type

String


exampleCouldBeNull

Signature

public exampleCouldBeNull

Type

String


exampleNumber

Signature

public exampleNumber

Type

Integer


exampleObject

Signature

public exampleObject

Type

ExampleObject


exampleString

Signature

public exampleString

Type

String

Methods

parse(json)

Parses the provided JSON string into a list of ApiServiceRecipesDataModel objects

Signature

public static List<ApiServiceRecipesDataModel> parse(String json)

Parameters

Name Type Description
json String Incoming JSON string. Often from an api call's results.

Return Type

List<ApiServiceRecipesDataModel>

Example

System.debug(ApiServiceRecipesDataModel.parse(ApiServiceRecipesDataModel_Tests.testJSON));

Classes

ExampleObject Class

example of how to model a nested JSON object

Fields

a
Signature
public a
Type

String


c
Signature
public c
Type

String

Clone this wiki locally