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

2
votes
2answers
24 views

Creating an Apex Rest Resource for a Request with reserved keywords

I am working on an Apex Rest Resource to provide an integration from our scm provider's web hooks. The request sent by the scm provider is in JSON format so I have created an Apex class to mirror that ...
0
votes
0answers
10 views

How to parse a url using Jquery in Salesforce Lightning App [on hold]

I am trying to parse a url ( it is a JSON) so that I query it based on the input using Jquery.
0
votes
1answer
25 views

How to convert json-formatted records to object records?

Hi I am trying to insert lead records these records in json format. i tried like this: List<string> first = new List<string>(); list<string> last = new List<string>(); ...
1
vote
2answers
42 views

System.JSONException: Unexpected character ('0' (code 48)): was expecting comma to separate OBJECT entries at

This is my apex code public PageReference find() { HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); Http http = new Http(); String url = ...
1
vote
1answer
32 views

Illegal Value for primitive when trying to parse the json data

I am facing the issue like "Illegal Value for primitive" when trying to parse the json data.Below is the Json Response which i get from a service. [{"revenue": {}, "emails": [{"grade": "A+", "type": ...
0
votes
1answer
31 views

Parse JSON string in AMPscript

We are currently passing a string attribute via the REST API that contains JSON. { "User_List": "[{\"name\":\"john doe\", \"email\":\"john.doe@mail.com\"}, {\"name\":\"jane doe\", ...
-2
votes
1answer
13 views

unstructured data

I have a need to store some data in Salesforce, and be able to access it from other pages and APEX stuff. Basically, the data is JSON. Right now I have APEX code that is attaching it to records as an ...
3
votes
1answer
27 views

PageReference: Redirect to built page

Can I build some XML or JSON in Apex and then redirect to it from a method that returns a PageReference object? public PageReference saveText() { PageReference p = new ...
0
votes
1answer
16 views

System.JSONException: No content to map to Object due to end of input

How to solve this error and why this error is occuring Here is my controller class public List<SelectOption> getItems() { HttpRequest req = new HttpRequest(); ...
0
votes
0answers
17 views

JSON parser response returning null [duplicate]

I am trying to parse JSON response from eventbrite api. but i am getting null in response. Not sure what i need to do. JSON "pagination": { "object_count": 81, "page_number": 1, ...
0
votes
1answer
37 views

how to obtain the json field name?

The JSON structure I am using is as follows : { "marketingModelPresentation": { "colors": [ … ], "colorThemes": [ … ], "asMap": { … }, "label": { ...
4
votes
1answer
50 views

Deserialize JSON to SObject

Following code is giving me common.apex.runtime.impl.ExecutionException String jsonText = '{"Data": {"attributes": {"type": "Contact"},"Id": "0036100000JUXKkAAP","Description": "","LastName": ...
0
votes
1answer
34 views

how i deserialize Nested Json String into Maps and need to insert it in Salesforce?

{ "ProductionOrder":"O000039", "statusType": "download", "Electronics/": [{ "Fridges": [{ "FileVar": { "Name": "Samsung", ...
1
vote
1answer
30 views

Remote Object Query not respecting multiple criteria on single field

I'm trying to utilize Remote Objects in order to query a Custom Object. Part of my criteria involves getting all records during a particular date range off of a single field. { where: { ...
2
votes
1answer
27 views

RestRequest in RestResource is returning null

I am having a problem reading JSON content using a RestResource. I am always getting a null value. My goal is to create a webhook to receive JSON content. Here is what I did. Created a Visualforce ...
0
votes
1answer
57 views

System.TypeException: Invalid conversion from runtime type Search.ResultSet to Search.Result

i have json string like this downbelow {"0":{"in":"mmm","loc":"1234"},"1":{"in":"mmm","loc":"1234"}} Now i need to parse them as like in | loc --------- mmm| 1234 mmm| 1234 So far i did public ...
2
votes
1answer
40 views

Nesting JSON Generators

I'm writing an Apex REST API to match a public API standard (so I have no choice in names, here) that uses the JSON+HAL format. JSON+HAL APIs have result members that start with "_"(e.g. {"_links": ...
3
votes
1answer
54 views

Method does not exist or incorrect signature: JSON.serialize(List<SObject>)

My org instance is https://ap1.salesforce.com/ Looks like it is an issue. List<String> myArray = new List<String>(); for(Integer i=0;i<10;i++) { ...
0
votes
0answers
15 views

Limiting the rows in dashboards using JSON Editor(Analytics Cloud)

I use a Raw data widget in the dashboards .for the each selection from the drop down ,raw data widget shows only 100 rows. is there any way to show up all the rows that comes up for the selection in ...
0
votes
2answers
29 views

System.JSONException: Illegal character ((CTRL-CHAR,code 13)): has to be escaped using backslash [closed]

I'm writing test class and i'm trying to give a json content to my controller but i get the error mentionned in the title should i replace all the " by \" ??? i have already tried by i still get the ...
8
votes
1answer
141 views

What is the correct JSON/Apex Strategy?

Summary I'm having a lot of trouble deserializing a JSON file into apex. The problem is not in how to deserialize a JSON string, but rather what type of apex objects I should be using. I don't come ...
0
votes
1answer
38 views

Email send speed impacted by Json API call

Here's what's happening: The emails contain a microsite url appended with several variables that pass to the microsite via httppost (was httpget) The microsite captures the variables and their ...
-1
votes
1answer
36 views

Inserting a PDF Record as attachment Maximum view state size limit (135KB) exceeded [duplicate]

I thought maybe I can do a work around of this issue "Maximum view state size limit (135KB) exceeded" by having the user insert all the document into salesforce first then select the documents that ...
1
vote
2answers
41 views

Blob is not a UTF-8 string field calculation

I'm trying to compare a checksum to the checksum of the file but I'm getting the UTF- 8 string error. for(file thefile : list) { thefile.checksum = ...
3
votes
1answer
38 views

Pass json string in url

I have a url like events.ktass.com/graze/v1/addSituationCustomInfo?auth_token='+cc+'&sitn_id='+bb+'&custom_info={incrf":'+aa+'} I want to apend json string like this ...
6
votes
1answer
119 views

AJAX load JSON from static resource

I am trying to load a JSON file into my VF app via AJAX. It currently sits in a zipped static resource, like such: myResources | |js | |target.json ...
0
votes
1answer
26 views

Parse Json String to object

Can anyone help me understand on how to parse the response in to a JSON object from string. String s = [{"id":"12345","Account":"31338","name":"Accounttest","subaccounts":[{"id":"39658"}]}] I'm ...
1
vote
1answer
31 views

Constructing nested json key element

Looking for an easier way to generate an element with nested attributes using the json generator. How would you generate the 'parent' element?
0
votes
2answers
105 views

Include JSON Feed in an Email

Our company uses JSON feeds as datasources for our emails. We are moving over to ExactTarget and there doesn't seem to be much documentation surrounding this. How would you use a JSON feed instead of ...
0
votes
0answers
29 views

i want update both member and contact details ,can anyone tell me the correct code?

@HttpPut global static string update_Contact(){ String requestBody = RestContext.request.requestBody.toString(); Contact c = (Contact)json.deserialize(requestBody, Contact.class); ...
1
vote
1answer
31 views

Field output order when conver object to JSON

I need conver from a object to json in this order: global class ResultDto { String ParlorCode; // 1st String DepartmentCode; // 2nd String EmployeeNumber; // 3rd String Name; ...
0
votes
1answer
25 views

Need to deserialize the json

We need to deserialize the json and assign it to a wrapper class.. { "facet_fields": { "CandidateStatus": [ "Actively Looking Qualified", 477, "Passive Headhunt", 441, ...
0
votes
3answers
50 views

JSON TO APEX conversion with number variable name

This is my JSON { "user":{ "self":"https://my.atlassian.net/rest/api/2/user?username=admin", "name":"admin", "key":"admin", "emailAddress":"test.test@gmail.com", ...
0
votes
0answers
38 views

JSON To Apex Parse

So requirements are as follows. I need to parse out this information from a JSON string and insert some detail records after the parents creation. I have the following - Can anyone tell me what im ...
2
votes
1answer
31 views

Cannot Deserialize a Json String?

Please guide me with Json As i am new to SF -> Json I am executing this in Developer Console. string leads ='[{"FirstName":"Kishore","LastName":"B T","Company":"IPL","City":"Bangalore",'+ ' ...
0
votes
1answer
29 views

Problem with parsing JSON deserializing

On recieving a response from the external system, I used Json2Apex to create the apex class viz.,JSON2Apex. Here's my JSON response for System.debug('##Raw Response-->' + responseBody); { "result": { ...
0
votes
1answer
25 views

Rest JSON Document body

{ Name:"name1" body:"blobbody" value1:"" value2"" } How do I deserialize the above request so that I can store "body" in Document object and other 3 values in a different object?
0
votes
1answer
43 views

Problem with parsing JSON response and deserializing

On recieving a response from the external system, I used Json2Apex to create the apex class viz., AuthCalloutPostWrapper When I use the following debug ...
0
votes
1answer
52 views

Problem with REST setBody while posting to an external service

I have a Json function generateBody that output as JSON. String requestbody = generateBody(caseids); The debug log for requestbody outputs as: {"Cases" : [ { "short_description" : "Test Text" } ...
0
votes
1answer
39 views

Salesforce Text Parsing Trigger

i have a JSON field separate by semicolon, for example [Quantity:"5", unit:"3",unitprice:"50.00"} These are submitted via an external process and write into this field. if(JsonField =! null() ...
1
vote
1answer
92 views

Salesforce JSON parsing error

I am having issues with JSON parsing. Here is my controller method: @RemoteAction global static String GetDetails(string sName) { //do soamething with sName later ...
0
votes
1answer
39 views

Passing variables from apex to javascript

I'm trying to get data from apex which is in this form Map<String1, List<Map<String2,String3>>> to use it in javascript before returning a result to the apex controller.. I have ...
0
votes
1answer
35 views

call an apex method from javascript

I have an apex method that returns a result in this form Map<String, List<Map<String,String>>> And I'd like to use this result localy to generate two dependent picklist. How can I ...
0
votes
0answers
9 views

JSON generation issue in EE

I have created a apex class which get called from VF page as @RemoteAction. The method generate JSON. The JSON generation work fine in Dev org but when I moved the same code to EE I getting error CPU ...
0
votes
2answers
68 views

JSON parsing an array - not reading object

Consider the following class, modified from this gist https://gist.github.com/sravalaparthi/69d76a710fb3689b0859 when it creates the objectWrapper object (qw), it's not populating it with the parsed ...
1
vote
1answer
65 views

Why JSON_PARSER_ERROR on such a simple object? [closed]

I am trying to create a new Opportunity in Salesforce, using their API. I am sending this object: {"Amount":"5000","CloseDate":"2015-12-01","StageName":"Prospecting","Name":"Rollio Sales Cloud-TEC"} ...
1
vote
1answer
35 views

Malformed JSON - Help creating wrapper Class/Controller

I keep getting Malformed JSON: Expected '[' at the beginning of List/Set error. Can someone please fix my wrapper class and controller for this JSON response to deserialize it? JSON: { ...
0
votes
0answers
12 views

Alternative way of finding the Report type

I need a little help with Reports. I get the report metadata in JSON, but the returned reportType is not meaningful enough to me so I can tell for sure for which Objects is the report. Here's sample ...
6
votes
1answer
55 views

Why does JSON.Serialize return null when passed a value of type System.Address?

Background I'm working on a project where I'm communicating with an external billing system to create a new Account in our external billing system when a new Account is created in Salesforce. Being ...
0
votes
0answers
32 views

What is the best way to show the results of a formula (in Wave) in a lens that is NOT a compare table type?

I have a formula that works great with the compare table output (example: B/A shown as a percent); however, I want to display the results in it's own chart. Any workarounds, JSON programming options, ...