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.

learn more… | top users | synonyms

0
votes
0answers
21 views

Confusion on Known Issues still being open [on hold]

I am generally a frequent follower of the known limitation section of salesforce and was confused by the JSON deserialize limitation. This link gives the details of the deserialize limitation saying ...
3
votes
1answer
25 views

JSON DeserializeUntyped Error Invalid conversion from runtime type List<ANY> to Map<String,ANY>

sample JSON string : '{'+ ' \"count\":\"1\",'+ ' \"querycount\":\"1\",'+ ' \"ranking\":\"adaptive\",'+ ' \"mindPage\":{'+ ----...
0
votes
1answer
40 views

Deserialize JSON value

Scenario : Deserialize the JSON format data using wrapper class. I have JSON data and wrapper class for the JSON. I want to see value for one of the property in inner class of the wrapper class. But ...
1
vote
1answer
30 views

Passing Sobject to apex rest method using JSON

I am exploring a way to pass a sobject to an apex class. Below is my apex class: @RestResource(urlMapping = '/resturl/*') global with sharing class check { public boolean Hide { get; ...
0
votes
0answers
29 views

My JSON data returnign NULL after deserialization

Here is my Wrapper class to handle the deserailized JSON data public class JSON2Apex { public list<path> pathData{get;set;} public list<MindTouchPage> mindTouchData{get;set;} public ...
0
votes
2answers
27 views

How to deserialize array of JSON objects to an APEX Map

I need to parse a JSON string like this into an APEX Map object, where I only want to go through the objects in the "results" array. How can I do this? { "count":6176, "next":"https://example....
0
votes
0answers
30 views

Adding a record via Javascript

I have the following: I have a table element populated by <apex:repeat>, which works fine. However I have some Javascript that appends a new blank row to the end of the table and while I have ...
0
votes
1answer
35 views

Serializes STRING into JSON Format

I'm trying to Serialize a string into JSON content but does not seems its JSON content and I have tried the following Is there a way to convert to JSON format or you have do manually? String ...
0
votes
1answer
40 views

How to convert list data into json in APEX

EDIT: I have tried something like this and I get no errors but does not display anything in the system.debug. String JSONString = JSON.serialize(mapWrapper); system.debug('JSONString : ' + ...
1
vote
1answer
60 views

Pass <apex:repeat> list values back to controller

I have the following code. <apex:outputPanel id="deliveryRights" rendered="true"> <table id="table"> <thead> <tr> <th>Category:</th> ...
1
vote
0answers
32 views

OAUTH 2.0 JWT How can I access request from client side to send JWT token to client application.

I am very new to the Oauth spec. I have done a lot of research but could not find the answer to what I should do. My task is currently my client application is using Salesforce as OAuth provider. So I ...
0
votes
2answers
40 views

How can I create this JSON structure using inner classes?

I am trying to create a JSON payload in a VF controller to send to middleware. I tried to use JSONGenerator.writeStringField(String, String) but kept getting error: "Can not write a field name, ...
0
votes
0answers
26 views

Creating JSON objects in SSJS

I am trying to create a JSON object from a DE as follows and the payload is always empty. Is this the right way to do this? Can I get some help? <script runat = "server" > Platform.Load("core"...
1
vote
2answers
33 views

How to save bulk data with some conditiond

i want to save following JSON data to "myObject__c". suppose i have already "test1@gmail.com" and "test3@gmail.com" in my salesforce object. So how can i save following data in "myObject__c" except ...
3
votes
1answer
131 views

Unable to parse large JSON in APEX

I have 52 keys and pairs in my JSON data, and I want to parse it, but the APEX method only supports 35 arguments to the method. Then how can I parse large JSON data with the APEX class? My JSON is: {...
0
votes
1answer
35 views

JSON Parser show: Expected WooProductModel.Image but found [line:1, column:2491]

I am trying to parse a JSON response from my own site. All the fields are populating with the exception of images. Not sure what I need to do to get the images data. Any help is much appreciated. My ...
1
vote
0answers
56 views

How to Convert data From CSV to JSON?

I am trying to create a Records from CSV File to Custom Object. This is my Method public Pagereference ReadFile() { NameFile1 = EncodingUtil.base64Encode(contentFile); string[]...
0
votes
1answer
32 views

Scheduled Apex Class Testing Issue

I am trying to test a scheduled class in apex, but upon running the test method it gives me the following error: System.JSONException: Unexpected character ('0' (code 48)): was expecting double-...
0
votes
0answers
70 views

Json Deserialization failed on token … and has left off in the middle of parsing a row

I am getting this exception when parsing JSON that was generated via json.serialize(trigger.new): System.JSONException: Json Deserialization failed on token 'a0Po000000B12345678' and has left off in ...
1
vote
1answer
34 views

How to deploy JSON codes in Email?

I need a help for the project I am working on. I have task that we have to display ads from third party server in email; when email is being render on client machine. Third party company who sources ...
1
vote
0answers
56 views

How does Guide Template Language parse a straight JSON array?

I'm learning Guide, and I've been able to parse an array of objects... AmpScript: set @json = '[{"voucher":"123456789"}, {"voucher":"234567890"}]' Guide: {{.dataobject JsonVar type=variable ...
3
votes
2answers
46 views

Unable to Set Created date even after enabling Set Audit Fields

This is a Follow up question to this. What I am trying to do is set the createdDate field in Account record using the below code as suggested by cropredy. I have enabled Enable "Set Audit Fields upon ...
1
vote
0answers
29 views

JSON Post via Apex - PKIX path Building Failed - What am I doing wrong?

This is my first time attempting a JSON POST and I trust your collective judgement. I would appreciate if someone could tell me if I am approaching this correctly or not. I didn't receive any compile ...
0
votes
0answers
59 views

How to implement pagination here?

This is controller where I have queried for listview with out using setFilterId method and I am getting the records according to listview values but pagination is not working public with sharing ...
2
votes
1answer
39 views

Assignment rule always auto fire with no reason

I got a project which needed to setup an public community as an endpoint to receive JSON messages (URL post method). My community home page got a restful apex class to receive message and process it ...
0
votes
1answer
52 views

Parse Json string to Salesforce object? [closed]

How to map json string with salesforce object(consider Lead)??
0
votes
0answers
23 views

How to get oauth2 access and refresh tokens in JSON format

Problem I am trying to connect to an external api using oAuth2, and at the moment have the following code I am running from the Execute Anonymous Window. I keep getting a 401 error and I think the ...
2
votes
2answers
123 views

Processing a json api response using JSONParser class

I am new in using JSONParser class, I am struggling a bit to understand how to use it. The string that I want to use this, is a reponse from an API call, it is a really long string (about 5.4 million ...
1
vote
1answer
217 views

System.JSONException: Malformed JSON: Expected '[' at the beginning of List/Set while deseriliasing json Payload

> I have resolved the issue updating answer for my own question thanks for response Stack-exchange great help everytime : > > > 1.Malformed JSON: Expected '[' > > Answer:...
1
vote
0answers
26 views

I am getting the Error during creating the JSON to APEX?

public class etTemplateNew{ public String contactId; //003m000000PM2HrAAL public Integer requestId = 0; //1 public cls_templateAttributes templateAttributes; public String ...
0
votes
1answer
53 views

Json parse in emails with ampscript

Im trying to parse some weather json data in my email. But I cant quite fiqure out the syntax. With this code I'm trying to get the main.temp value printed. Below is my code so far, but it dosnt work :...
9
votes
1answer
324 views

JSON: Cannot deserialize instance of date from VALUE_STRING

I'm officially breaking up with Salesforce Date parsing. This has got to be the most frustrating thing. I have the following date in a JSON string (full JSON below): 2017-06-03T10:34:24.000Z ...
0
votes
0answers
22 views

MobileConnect: REST API Linebreak

I am attempting to trigger a MobileConnect message via REST API (and PHP) that includes a linebreak (uses \n). However, I haven't been able to successfully get the linebreak to generate. An example of ...
1
vote
0answers
16 views

save data from apex class generated from J.S.O.N response [duplicate]

I have got a JSON response from external system which consists of some data which need to be saved in sales force. Now I have de-serialized the JSON data to apex class using some tool. and how do ...
1
vote
1answer
49 views

Complex Json deserialize using JSON.deserializeUntyped

How to de-serialize following array of response from the url??I have to pass time stamp in the URL as follows:Tried Json to apex too but as it is post method can't use that. String startdate= ...
0
votes
0answers
59 views

How to serialize JSON with apex wrapper class?

public class etTemplatePR { public String toAddress, templateId, contactId; public Integer requestId = 0; //public tAS[] templateAttributes; Map<String, String> jsonStr = new Map&...
0
votes
0answers
17 views

How to create a JSON serialize key and value with MAP functionality [duplicate]

public class etTemplatePR { public String toAddress, templateId, contactId; public Integer requestId = 0; public tAS[] templateAttributes; public etTemplatePR(String toAddress, String ...
0
votes
1answer
84 views

Wave Analytics Data Flow Change Column names

I'm using a dataflow to bring in Salesforce record data but I would like to rename the columns in my dataset from their Salesforce API name ("SAP_Territory_Name__c") to another name ("Territory"), not ...
1
vote
2answers
90 views

How To Generate JSON Request Body from Wrapper Request Class

I am writing a REST Service and have created Request and Response Wrappers, Finding it difficult to generate the JSON Request Body out of the wrapper classes. Below are the Sample Classes. public ...
0
votes
1answer
39 views

calling PriceBookEntry from Javascript

After reading tons of links, posts and many documents, I decided to ask for help here, hopping some guru can help me with this issue: <!-- Visualforce Remote object component for Products --> &...
1
vote
1answer
50 views

Rest API with JSON using Integration

I have created 3 classes. APex Class Callout Class JSON Parser Class In that "apex class" I'm calling the JSON class. It shows the error"Invalid type: templateAttributes1" Line number 29. Please ...
1
vote
1answer
16 views

Error: report filters

problem, i try to dynamically filter a report but i get an error. The apex code to set the filter dynamically based on some conditions: filtre ='column:\'account.name\',operator:\'equals\', value:...
0
votes
0answers
24 views

update object from web application integrated via canvas app

I integrated a canvas app in a visual force page, and this page in an account page layout. I want to update the account record with data sent from the web application, how to get the context in the ...
2
votes
1answer
57 views

JSON.deserialize with arrays with one to many elements

I am consuming a REST service with APEX. Here is a response sample: { "createQuoteOutput": { "response": { "quoteNumber": 945, "temporaryQuoteNumber": "T8652" }, "...
1
vote
1answer
29 views

JSON String test class

I am using a json string like this in a test class. [{ "id":"01t4B000000XrvhQAC", "name":"abc123", "DateRange":{"startDate":"2020-02-17","endDate":"2020-02-26"} }] Now instead of hard ...
2
votes
1answer
51 views

How Can I Ignore Unknown Json Properties in Apex

I'm doing a web service call, and parsing the json response into a wrapper object for display on a Visualforce page. My wrapper object looks like: public class CustomerAddresses { public String ...
2
votes
1answer
74 views

Guide Template Language to provide dynamic links via href attribute from JSON

I'm using GTL to parse a JSON attribute coming from a Data Extension. Everything works fine except links in href attribute. For some reason/limitation they don't render in the href attribute. I was ...
0
votes
1answer
53 views

JSON: how to declare an attribute whose name contains $ symbol? [duplicate]

I have written apex class.variable declaration is: public string QPA$MV2 {get;set;} It shows error: Error: Compile Error: Invalid identifier: QPA$MV2 at line 254 column 23 How to resolve it ?
0
votes
1answer
56 views

Getting error while sending/serializing JSON object to update

From Salesforce I am trying to make restful api call to a CPQ system. I am able to make a login (POST request) I am able to query the Account object & retrieve the id & fields on the ...
1
vote
3answers
42 views

JSON Opportunities and OpportunityLineItems garbled

I am trying to POST Opportunity with OpportunityLineItem data to an endpoint. I can get the opportunity data just fine but I am having a lot of trouble with the OpportunityLineItems and I feel myself ...