Questions tagged [json]

JSON, or JavaScript Object Notation, is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML.

Filter by
Sorted by
Tagged with
0 votes
1 answer
55 views

Strange behavior JSON data

In a data extension we receive some basic JSON data. Like this: [ { "adressoort": 1, "is_ontvangstadres": "true", "persoonsnaam": "Test", ...
0 votes
1 answer
1k views

Einstein Analytics Label Values are not changing?

I have changed the labels in the XMD for my Einstein analytics Dashboard and these are not changing on the Columns in the data table, is there a known issue with Formula Fields or something is the XMD ...
0 votes
2 answers
999 views

Unable to insert the records in my custom object using batch Apex

Thanks in advance. I have a batch apex code here. I want to insert the records into my custom object. what is the code for inserting the records. global class WeatherForecastBatch implements Database....
0 votes
2 answers
969 views

Get values in a List from JSON

I'm doing a REST API call to get the global value set and trying to deserialize the JSON result to get the picklist values in a List. Here is the JSON: { "size": 1, "totalSize"...
0 votes
1 answer
42 views

SOQL - Relationship extract json from child object and join picklist label

This soql SELECT Id, Name, (SELECT CountryISOCode__c, Name, Role__c FROM Person__r) FROM Market__c returns a row that looks like this: Id NAME Person__r a081.. C1 [{"A":"foo", &...
0 votes
1 answer
73 views

How to Add Contact Id into JSON Payload for Apex Testing

I am trying to test a wrapper class for a platform event/platform event trigger flow and I am not sure how to add a contact record Id I created earlier in the test class to the JSON string. Update The ...
0 votes
0 answers
28 views

External Service with nested objects - How do you set input to the Action in Flow

I setup an external service to execute a Post callout through a Flow Action. The problem is I can't set the input in the action to an Apex-Defined variable which has two variables nested in it. I have ...
0 votes
1 answer
1k views

Concatenation of fields and text in Compact filter

I have this statement in SAQL q = foreach q generate Region, TerritoryRMA, ContactSysId, PurposeTopic, HasActivityFlag, 'Territory'+\"~~~\"+'Flag' as TFlag; q = filter q by TFlag in {...
1 vote
1 answer
50 views

Type cannot be serialized

our org use a managed package PCK1. This package has the following class: global class Parent { global class Child { global string field1; global string field2; global ...
2 votes
1 answer
1k views

DUPLICATE_VALUE error - Composite REST API by External Id

I'm trying to upsert a record using an external Id with composite API. my external Id is (External ID) (Unique Case Insensitive) - to be precise - I created this field only with the external Id ...
26 votes
2 answers
29k views

System.JSONException: Apex Type unsupported in JSON: Object

I was trying to parse json to apex but i was getting System.JSONException: Apex Type unsupported in JSON: Object My apex code was public class patdetils77 { //public String ...
0 votes
2 answers
3k views

JSON Array String into List

Sorry for this noob question but I just want to ask: String stringJSON = '[{"action":"ASSIGN","value":"Router"},{"action":"DISABLE","...
0 votes
1 answer
2k views

Unexpected end of JSON input when trying to authorize my sandbox from vscode

I am trying to authorize my sandbox org from vs code > After logging in with my credentials, I keep on seeing this output from the browser which I Quoted below "Unexpected end of JSON input ...
0 votes
2 answers
837 views

HTTP GET request desterilize with wrapper class 'non static method' error

Hi all i'm trying to retrive data from a source which gives me a json with all of a certain property listing details such as bedrooms bathrooms etc... so I'm trying to parse the data using a wrapper ...
0 votes
1 answer
41 views

After Enabling the namespace class not executed from LWC

I have a LWC that passed the parameter as an Object, which worked fine. However, after enabling the org's namespace, the apex method was not executed with that object parameter and threw an Internal ...
3 votes
2 answers
5k views

Getting error : Nested object for polymorphic foreign key must have an attributes field before any other fields

My mock body looks like : '{"totalSize": 1, "done":true, "nextRecordsUrl":"WWW.testurl.com","records":[{"Name":"Fund1", "...
0 votes
1 answer
78 views

HTTP Response data being Truncated

I am making a http request and getting response in JSON . When I am converting it to String using request.toString() but getting the truncated response response sample(This is the part of response ...
2 votes
3 answers
4k views

How to upload an image as a binary file via the Linkedin API v2 with a 'POST' request

I want to know how to make a proper 'POST' request to upload an image as a binary file to Linkedin via their API. This is what they say in their documentation (https://docs.microsoft.com/en-us/...
0 votes
1 answer
2k views

Unable to open the dashboard. Something went wrong while displaying this dashboard. Try closing or reloading the dashboard

I have a couple of Wave Dashboard that up until today have worked perfectly well. They utilize data from a single Data Recipe, primarily comprised of data from the Contact Object. All Replications, ...
0 votes
1 answer
1k views

Handle the single and multiple JSON record with one wrapper class

When i am getting multiple data in mindTouchPage then my code is working. But when i am receiving a single record as response then it throwing the exception System.JSONException: Expected List but ...
0 votes
1 answer
971 views

How to i fetch the ID Value from the JSON Stringify Response which i get after saving an Account record from a Lightning component?

I have the below Code in my Controller code var action = component.get('c.createAccount'); action.setParams({ ac : component.get('v.accountRecord') }); ...
6 votes
1 answer
2k views

Message sent through Marketing Cloud isn't delivered and doesn't show up on the deliveries endpoint, what can it be?

I'm making a call to Marketing Cloud's endpoint to send SMS messages like this: -- request to /sms/v1/messageContact/{messageId}/send { "mobileNumbers": [ "55009999999999" ], "...
0 votes
1 answer
1k views

I'm Unable to deserialize an HTTP JSON object response

I'm trying to deserialize http json output . Getting an ERROR :System.JSONException: Malformed JSON: Expected '[' at the beginning of List/Set public static void syncBC(){ HttpResponse ...
0 votes
0 answers
45 views

Is it possible to maintain the order of json string using JSON.serialize? [duplicate]

I have a simple json format that I am trying to practice for the complex format that I am going to make. But it seems like, I'm not able to maintain the order when using the JSON.serialize method ...
0 votes
1 answer
79 views

Parsing Google Maps JSON with APEX [duplicate]

I work for a small non-profit that helps young people from disadvantaged backgrounds get a start in STEM careers. We're looking to match participants with placements based on location parameters so I ...
1 vote
2 answers
83 views

JSON.deserializeUntyped Error : System.JSONException: For input string

I have a simple REST API call sent from apex class, I a trying to handle the response body with the bellow code: String jsonPayLoad = '{"Accts":[{"Name":"ABC","Exp&...
0 votes
1 answer
931 views

Einstein Analytics data binding to boolean value

I am trying to conditionally hide tabs based on the output of a certain table. Currently I am attempting to set the navigationHidden property of the page to false like so: "navigationHidden": "{{cell(...
0 votes
1 answer
59 views

Multiple Items in HTTP Request Body Using wrapper [duplicate]

public class test{ public Boolean one{ get; set; } public Boolean two{ get; set; } public Boolean three{ get; set; } public Boolean four{ get; set; } public ...
0 votes
1 answer
986 views

Wave Einstein Analytics filter relative dates in dataflow with filter node

I need to filter opportunities in my dataflow that have a date 'last month' to 'end of current year'. I cannot use filters in the sfdcDigest node as I am doing a couple of calculations later that need ...
-1 votes
1 answer
40 views

Deserialize JSON in apex. JSON has object array [duplicate]

I have a JSON which I'm trying to deserialize into the apex class. JSON structure : { "resourceType": "Bundle", "entry": [ { "resource": { ...
0 votes
1 answer
2k views

How to check if a http response is null when it is an empty object and status code is 200?

Im making a POST to an endpoint and this is what I get back in my response, its a successful POST and the status is 200 but the payload is empty. { "payload":[], "datetimestamp"...
1 vote
1 answer
933 views

Change Time Zone in Wave Dashboard

I am using page 28 of this doc for reference: https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/bi_dev_guide_saql.pdf I need to change the time zone in the step. I am trying to use the ...
1 vote
2 answers
334 views

Is JSON deserialization in Apex case sensitive?

If I have to deserialize a response like this: { "Property1" : "value", "Property2" : "value2" } Do I have to respect the case of the property names? I would ...
0 votes
0 answers
28 views

Upload user photo using REST API [duplicate]

I have a problem uploading a user's photo using the REST API. I follow the documentation https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_input.htm#fileUploadExample ...
4 votes
1 answer
387 views

Hot to get serialized data with PageReference.getContent() inside a Managed Package provided by Visualforce outside of the MP?

We need to get JSON-Data inside of a Managed Package (there in an Aura Component) from Apex-Code residing outside of the Managed Package directly unmanaged on the subscriber org. We do not want the ...
1 vote
1 answer
112 views

How do you use Salesforce Data Cloud data for personalization in SFMC?

This question is more from an understanding perspective. I am trying to implement omnichannel solutions for a client using Saleforce Data Cloud (SDC) as CDP and SFMC for deployment of messages. The ...
0 votes
0 answers
53 views

Can you do an IF conditional from a JSON payload that looks for a specific value in the key value pair?

I've got a JSON payload that has an itemStatus in there. The itemStatus is either "Cancelled", "Backordered", or "". I need to strikethrough in CSSthe Item Name if the ...
19 votes
1 answer
86k views

How to deserialize a JSON String to Apex

How can I deserialize this json object: { "response": { "count": 1, "benchmark": 0.22567009925842, "requests": [ { "request": { ...
1 vote
1 answer
198 views

JSON.serialize() Map<String, Object> changes Map structure

I have a Map<String,Object>() which I am trying to store in a text field for a subsequent asynchronous operation. My idea was for the following async operation to query for this map and re-use ...
0 votes
1 answer
329 views

ssjs System.Collections.Generic.Dictionary`2[System.String,System.Object]

I have a SSJS code that i am running SFMC cloudpages. The code is to do a HTTP.GET call to a url and then parse the JSON response.when trying to write out the result of parse i receive the following ...
0 votes
0 answers
47 views

How do I capture the Picklist Selected Event and write the code behind?

To everyone, I'm new to SFDC, but I'm not new to development. Here is what I'm trying to do: 1.) Place Picklist on the Lead page with values RDC and Wire - this is done 2.) Capture the Picklist ...
0 votes
0 answers
28 views

Apex to JSON string [duplicate]

Can some one please help me write the Apex class to generate the JSON string as in the below specific format: Start with static header node and then the Array of records. The first node ('...
2 votes
2 answers
6k views

Invalid character in identifier in Wrapper class

I am doing a rest call with the below endpoint string endPoint = 'https://test.salesforce.com/services/data/v43.0/query?q=SELECT+Name+,+RecordTypeId+,+Code__c+from+Account'; I have the below class ...
-2 votes
1 answer
68 views

JSON: Expected '{' at the beginning of object Error is in expression '{!TrackCovd}' in component [closed]

When I use a api using I check all the code twice time but not get where the problems occurs when I fetch the result is find only null because of this is a problem statement System.JSONException: ...
-1 votes
1 answer
81 views

Convert XML to DataTable

I have following XML format returning from API. I need to extract in LWC Datatable. XML 1: <steps id="0" last="4"> <step id="2" type="ValidateStep"&...
9 votes
2 answers
3k views

How to deserialize JSON to a class where the same variable name has different data types?

I am trying to deserialize some JSON to a class using JSON.deserialize. My JSON looks like this { "type": "GeometryCollection", "geometries": [ { "type": "Point", ...
4 votes
3 answers
2k views

Looping through json in email - impossible?

This nested Guide Template Language snippet brings me 6 rows of titles. Problem: I have a complex layout in an email and I want to populate it with titles in different places. I can not make a ...
1 vote
0 answers
142 views

Type cannot be serialized - Working in unmanaged code, failing in managed package

I'm working with the following JSON: { "compositeRequest" : [ { "url" : "/services/data/v58.0/sobjects/Case", "referenceId" : "Parent", &...
-2 votes
1 answer
403 views

JSON deserialize throwing on error on deserializing an sObject

I am trying to convert a sObject inside a JSON object. I have created a JSON structure using a class. public class AccountData { Public List<AccountDataNode> AccountList; } public class ...
2 votes
3 answers
2k views

Issue on JSON.serializePretty

I am using Salesforce with a Java integration project. Here I am integrating data from a SQL database to Salesforce using webservices and vice versa using JSON format webservices. Here is the code: ...

1
2 3 4 5
30