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
-1 votes
1 answer
35 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": { ...
Salesforce Dev's user avatar
0 votes
0 answers
26 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 ...
Piotr W's user avatar
0 votes
0 answers
45 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 ...
Erik B's user avatar
  • 63
0 votes
1 answer
59 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 ...
Anay Shrikar's user avatar
1 vote
1 answer
70 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 ...
Arthlete's user avatar
  • 4,857
0 votes
1 answer
46 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 ...
sam sfmc's user avatar
0 votes
0 answers
44 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 ...
Eric C.'s user avatar
0 votes
0 answers
27 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 ('...
Kris's user avatar
  • 1
-2 votes
1 answer
60 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: ...
Himanshu Rai's user avatar
-1 votes
1 answer
61 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"&...
Ragul's user avatar
  • 1
1 vote
0 answers
133 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", &...
d_k's user avatar
  • 1,291
0 votes
1 answer
67 views

put(field, value) method from SObject class throws System.SObjectException: Illegal assignment from String to Datetime

I have encountered the error System.SObjectException: Illegal assignment from String to Datetime and I can't find what is the reason for this error. The context is as follows. I have a class with the @...
Tzinm's user avatar
  • 1
0 votes
1 answer
89 views

Need help with JSON deserialize

JSON deserialize is not working. however, data is coming from LWC in DATA parameter @AuraEnabled public static string saveProductLineItems(Object data) { system.debug('LINE 18 data:'+ ...
SF Dev's user avatar
  • 13
0 votes
1 answer
43 views

Assign value to wrapper throw null exception

I have a JSON String Need to pass as request body with configurabale parameter as below.I have used a wrapper class for that called as EmailWrapper , but here assign value to wrapper.options.fieldOne ...
Buhuni's user avatar
  • 9
-1 votes
1 answer
120 views

Create a JSON using Custom metadata type [closed]

I have a custom metadata which store some parameters which I need to pass in Post callout.I have stotred the Options in below JSON in that custom metadata { "email": "[email protected]&...
Buhuni's user avatar
  • 9
0 votes
1 answer
73 views

Convert or parse datetime coming from external system and save it in salesforce [duplicate]

I am calling a rest api and one of the attribute of the response is datetime which is in CST format(6/26/2023 7:01:50 AM). I tried converting to date time format but its throwing Invalid date/time: 6/...
Sancool's user avatar
  • 43
0 votes
3 answers
50 views

How to update null records in JSON

I'm currently working on the below JSON. Sometimes records in matches return null, instead of record. And null will appear anywhere within the array { "status": "success", ...
Pavan tej's user avatar
  • 1,439
0 votes
0 answers
111 views

How to remove attributes array from JSON

I'm currently working on a lightning component with a lightning tree grid. So, I'm serializing my output as JSON and it's working fine but fetching type attributes array too. How to remove a variety ...
Pavan tej's user avatar
  • 1,439
-1 votes
2 answers
43 views

Accessing the Deserialized JSON list's values and modifying the null values

I have deserialized a JSON data into a list.I want to access the null values present in the list for any wrapper variables and modify it to an empty string. Deserialization Code: lstSeeds = (List<...
Hira Khan's user avatar
0 votes
1 answer
47 views

How to use a variable mapping a json

I need search the assets types in a json but mapping I have a block key that is different in all blocks. I set a variable that cointains this values but when I want to use do not retrive the things ...
Juan's user avatar
  • 1
1 vote
0 answers
398 views

How to pass JSON data in the REST API URL without misinterpreting double quotes?

Hello Salesforce community, I'm currently working on integrating with a REST API and facing an issue with passing JSON data in the URL. Whenever I try to include JSON data, specifically the provided ...
Avin Babu Pattathy's user avatar
0 votes
0 answers
23 views

REST - Journey with DE as trigger

In my app i have a api call which creates a new dataextension through the soap API. When that is done I want to create a new journey with that DE as a starting source. I'm able to create the journey, ...
Kriss's user avatar
  • 1
1 vote
2 answers
202 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 ...
fred's user avatar
  • 2,753
0 votes
1 answer
74 views

Cannot parse JSON with new AMPscript function to retrieve token -- value is blank

So I've retrieved this json array below frommy api (obviously this is not the real token value), but this is the payload I'm receiving. {"access_token":"token","expires_in&...
en-rep's user avatar
  • 25
0 votes
1 answer
69 views

How to handle null arrays in JSONResponse

Currently, I'm working on an HTTP class and trying to parse HTTPResponse to a custom class but I'm getting below exception.How to handle if a specific array in JSON response returns null Expected ...
Pavan tej's user avatar
  • 1,439
0 votes
0 answers
75 views

Use POST method to get a field value from JSON

I need some similar help. How can I get some field value from a JSON that some API provided me? Using the Post method For example, I have an API https://api.comprovei.com.br/api/1.1/util/export/...
Valteir Junior's user avatar
0 votes
1 answer
50 views

Extract Particular value from the result list and store them in another list

Hi I have a list type of List which is returned from the invocable action. List<Invocable.Action.Result> results = action.invoke(); I am getting the data as below in the form of result. (Result&...
Shekher's user avatar
  • 11
2 votes
1 answer
80 views

Insert records of user Selected Object without knowing object first

If I have a list of object strings containing field data for an object and I have a parameter selecting which object this should be inserted into, is it possible to write apex to insert those records? ...
Crash667's user avatar
  • 239
0 votes
1 answer
149 views

BuildRowsetFromJson not returning anything

I am trying to use the new function in ampscript - BuildRowsetFromJson. But I am not getting the expected outcome. What I am doing in my code Calling the public endpoint The endpoint returns JSON in ...
user0151's user avatar
0 votes
0 answers
77 views

How to specify null value for a currency field in a sfdx cli call

I need to set the value of a currency(18, 0) filed to null. I am using the following command to update the value of Annual_Potential__c field to null sfdx data:record:update -o ,myusername.@<...
sfdx-developer's user avatar
1 vote
1 answer
49 views

My LWC doesn't output the right format to be picked up in my Apex parser

I have a LWC which outputs a list of Line Items. Here is createInvoiceLineItems.html: <template> <lightning-card title="Invoice Line Items"> <template for:each={...
Luke Bray's user avatar
  • 506
1 vote
1 answer
353 views

Why is my SSJS if else if else function not working?

I have an attribute field called "klantnaam". In another field called "adressen" I have a JSON array with several objects. In the object I have the following fields: adressoort, ...
Martijn e's user avatar
  • 145
0 votes
0 answers
59 views

Error deploying or retrieving source for <LghtningMessageChannel> by manifest folder

I have to deploy a messagechannel folder where there is a tag <LightningMessageChannel>which I have to add at the manifest folder and at package.xml. Now when I am deploying the below error is ...
SOMANKAR CHAKRABORTY's user avatar
0 votes
1 answer
162 views

Error Message: "Unable to retrieve security descriptor for this frame." - Get JSON Data using SSJS in SFMC

I've just started to get my head round SSJS and tried this simple script from a tutorial as the script I wrote (same logic) was erroring in the same way. I am looking to upsert data into a DE from a ...
Eddie Belhay's user avatar
0 votes
1 answer
191 views

JSON.serialize got cycle detected error

I am getting the Cycle detected. Multiple references to ... error when executing the below line: System.debug(JSON.serialize(sopAssets)); I tried to search for this error but currently has no clue ...
Lance Shi's user avatar
  • 13k
1 vote
1 answer
69 views

My list of objects does not render in lightning table after deserialization in Apex

So I have this big JSON file that I'm trying to display in the table in LWC. I have made an Apex class that will deserialize my JSON file into Objects. My JSON file is uploaded in Static Resources. ...
Greckon121's user avatar
-1 votes
1 answer
26 views

Help With Parsing Wrapper Class For Xero Contact

I am trying to update a Xero contact with Payment Terms when a salesforce account is updated. I extracted the json for a contact using Postman and then used json2apex to generate the wrapper class. ...
DanP's user avatar
  • 21
0 votes
2 answers
117 views

Creating JSON Code Resource

Description: I am trying to create a Cloud Page Cloud Resource (JSON) that returns JSON data to a front-end client. I have started with this test endpoint, however, I does not return the JSON or ...
MarquezMoore's user avatar
-3 votes
1 answer
56 views

API Integration / Body error : Malformed JSON: Expected '[' at the beginning of List/Set

I'm trying to integrate an API to Salesforce and I don't why I've got this error when I'm trying my code : " Malformed JSON: Expected '[' at the beginning of List/Set " I've searched on ...
Kramas's user avatar
  • 1
1 vote
0 answers
96 views

Postman returning FIELD_INTEGRITY_EXCEPTION, on inserting PlatformEventChannelMember

In this trailhead: https://trailhead.salesforce.com/content/learn/projects/create-a-custom-channel-and-enrich-change-events/add-a-channel-member-and-configure-change-event-enrichment I'm trying to add ...
Luis Aguiar's user avatar
0 votes
0 answers
40 views

Malformed JSON: Expected '[' at the beginning of List/Set after update a EAR file

I have an apex class that converts a JSON response to a list. After update a ear file from my API, the JSON response now has new fields. Before the update, the class works perfectly, but with the new ...
Dionatan's user avatar
0 votes
1 answer
119 views

Format for including @api recordId in JSON.parse

I have a Lightning record page and just want to include the recordId in my JSON string variables passed to Flow. I understand including the decorator, etc I just cannot seem to get the correct format ...
ddeve's user avatar
  • 1,547
0 votes
1 answer
551 views

How to configure LWC to accept and map a JSON string as Input variable

I am trying to modify my LWC, which launches a Flow, to accept a JSON string as input with any variables that I want to pass to the flow defined in the JSON string. Reason is to allow the LWC to be ...
ddeve's user avatar
  • 1,547
0 votes
1 answer
103 views

parsing trough a JSON html string to obtain key-value pairs?

Im calling an API and after parsing trough the json this is the part I need: "description": "<b>Precipitating Event</b> updated from: to: testing update\n<b>Age</b&...
potato46's user avatar
0 votes
1 answer
163 views

"Malformed JSON: Expected '{' at the beginning of object"

When i execute the apex class in the Annonymous Window i get the output, but when i call the apex class in js . in the console i get "{ "exceptionType": "System.JSONException&...
Lavanya Pushpakar's user avatar
0 votes
0 answers
45 views

Unable to parse JSON with list

Currently, I'm trying to access JSON with the list included, but when I tried to access the organization from the matches list it's saying variable doesn't exist. Please let me know how to fetch the ...
Pavan tej's user avatar
  • 1,439
0 votes
0 answers
21 views

Adding/Editing External Services Unusually Long Load Times?

I am new to Salesforce in general, so apologies if this is not a good question. I have setup within Salesforce and External Credential and Named Credential following the documentation. Although, once ...
RSIPES's user avatar
  • 1
0 votes
1 answer
159 views

Parsing JSON via GTL and AMPScript in marketing cloud

I need to create an automated email that will be triggered and sent to customer whenever a customer has requested to cancel a number of items within their order. I'm using both ampscript variables and ...
T01's user avatar
  • 9
0 votes
1 answer
1k 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"...
potato46's user avatar
1 vote
1 answer
49 views

Issues with Json2Apex

I've generated JSON2APEX class for complicated JSON, but when I created an instance of this class I can't deploy class where this instance is created, compilator doesn't see inner classes and throws &...
RandomNickname23's user avatar

1
2 3 4 5
30