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
16 views

How to debug class [duplicate]

I am new to debugging want to debug my class. Please tell me the way how I can. Here is my class: public class JSONParserUtil { @future(callout=true) public static void parseJSONResponse() ...
0
votes
0answers
14 views

Returning data from Heroku app to Salesforce? [closed]

anyone have an example code snippet for returning json from a java heroku app back to salesforce?
0
votes
1answer
25 views

Apex convert String to JSON

I want to response as a json not string String jsonString = '{"method": "POST","url": "types","body": {"name": "Ranjit121212","description":"ranjit34443333"}'; String accountsJSON = JSON....
0
votes
1answer
22 views

Illegal assignment from JSONGenerator to JSONGenerator

I have written a code for generating json JSONGenerator gen = JSON.createGenerator(true); // Create a list of integers to write to the JSON string. List<integer> intlist = new List<...
1
vote
1answer
30 views

Cannot deserialize instance of base64 from VALUE_STRING value

I have a class below where I am inserting a new merchandise object and also creating an attachment to be attached with this merchandise object(in notes and attachment object) using a http POST . I am ...
3
votes
1answer
54 views

Attaching document by Calling Apex REST resource

I am trying to create an attachment in Salesforce using a Apex method which is exposed as Rest resource. I am trying to create a merchandise record where the attachment should be attached to the notes ...
1
vote
1answer
39 views

How to create trigger for DatedConversionRate object

We're using multicurrency in our project. DatedConversionRate has been updating every day by external process. The requirenment is to update CurrencyType records with most relevant rates. At the ...
0
votes
1answer
26 views

Apex class in Rest Services

I have the Request Body in Postman like { "eventitems": [{ "whatid": "0012800000i92pd", "whoid": "0032800000TirUN", "OwnerId": "005280000010olH", "...
1
vote
2answers
54 views

Way to parse JSON object with dynamic number of fields

Below is the sample JSON string I received from our web service: { "id": 1, "result": { "0": 15, "1": 16 }, "error": null } Please notice that in the result section,...
0
votes
1answer
21 views

how to use JSON.serialize() on a wrapper class ?

I want to use AngularJs in a my page to filter a list of records, i found this article very helpful. the problem is in the article, the JSON.serialize is applied on a list like this public static ...
0
votes
1answer
28 views

how to assign data from Inner class to out class

i have succesfully parse my JSON data. but now i want data back from following APEX method "getCustomerData()" like below: DxModel[id=2, email=asd@GMAIL.COM, first_name=clerk, last_name=dx, ...
0
votes
1answer
24 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 ...
2
votes
2answers
132 views

Trailhead Apex Super Badge JSON Parsing

Working on the Trailhead Apex Super Badge.... There is a section that requires writing a rest callout that returns a chunk of JSON that you are to use to update Product2 records with. Reduced Chunk ...
3
votes
1answer
32 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
50 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
44 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
33 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
35 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
31 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
39 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
67 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
74 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
44 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
47 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
35 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
34 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
137 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
39 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
80 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
33 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
118 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
39 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
67 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
50 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
31 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
66 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
47 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
60 views

Parse Json string to Salesforce object? [closed]

How to map json string with salesforce object(consider Lead)??
0
votes
0answers
27 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
151 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 ...
2
votes
1answer
326 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
29 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
65 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
444 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
26 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
58 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
84 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
137 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 ...