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
1answer
23 views

How to send Empty field value as blank (Not Null)

Apex Code: List<order_batch__c> bcList = new List<order_batch__c>(); bcList= [select Or_invoiceadd1__c,Or_invoiceadd2__c,Or_invoiceadd3__c,Or_invoiceadd4__c from order_batch__c ...
0
votes
1answer
26 views

Getting error while deserialize

I am trying to deserialize a jason request but getting error that Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at ...
1
vote
0answers
26 views

What is the best approach to store 10 MB JSON and perform CRUD in SFDC?

I have a business case to design a solution for a web based excel like (UI, formulae, etc..) system. I researched and finalized to go with JQuery.Sheet. However, there is no recommendation laid ...
2
votes
2answers
40 views

list changes the column order of records while debugging

Apex: List<order_batch__c> bcList = new List<order_batch__c>(); bcList= [select Or_sub_po_number__c,Or_customer_PO_Number__c, ...
1
vote
1answer
39 views

Deserialize in SObject in apex

Hi I am trying to deserializing the json response and successfully parse the json response,Respone string look like : ...
4
votes
0answers
80 views

Issue in parsing JSON when special characters are included

I have a Json file which has some special character as below:- { "TXT1": "Tést Data", "TXT2": "can®." }, The Special character (é.®) gives me a error BLOB is not a valid UTF-8 string while ...
3
votes
2answers
72 views

Deserialize JSON Root Array

I'm having so trouble deserializing a JSON stream that contains an array as the root: [ { "object": { "property1":"000000", "property2":"000000" ...
1
vote
1answer
40 views

Is there any different calling JSON directly from visualforce page and javascript Static Resource?

I create one javascript file and call JSON from there.Before I use JSON, I use hardcode data and it works.But I try to load data using $JSON, somehow it does not works.Check the code below ...
3
votes
2answers
78 views

What is the maximum number of records I can send per RESTful API call?

There is a maximum batch size for the number of records returned by an API call. Most of the documentation for the API calls reference including a .json file, and some, like the Update a Record ...
2
votes
1answer
27 views

Passing a Name to customize html field on ExactTarget triggered email from Salesforce

I am sending an exact target triggered email using the salesforce Apex developer. However when a member's name does not already exist on the ET side I do not know how to pass that information to ET. ...
6
votes
2answers
78 views

Checkmarx and JSON.serialize

My Salesforce1 code has been recently run through Force.com Security Scanner (a.k.a. Checkmarx). A stored XSS vulnerability has been found and marked as critical security risk. It boils down to ...
3
votes
2answers
91 views

JSON response parser returning some fields null

I am trying to parse a JSON response from google. All the fields are populating with the exception of 'lat' and 'lng'. Not sure what I need to do to get the coordinates. Any help is much ...
4
votes
1answer
34 views

Issue sending triggered email in exactarget using Apex developer

I am trying to fire an ExactTarget triggered email using the Salesforce developer console. I am now getting the error "Problem initating message send during deserialization of JSON payload" Http ...
2
votes
1answer
17 views

JSON Reciever Endpoint

I'm wondering if it is possible to expose an SF endpoint to the internet that can receive JSON data. Its fairly simple to call out to an external service and retrieve data, but I am wanting an ...
3
votes
1answer
47 views

need a method for json string which contains null value and does not contain attributes{ }

please help me, I need a method for json string which contains null value and does not contain attributes{ }. Here's what I currently have: List<Contact> contacts = [SELECT Id, Name, ...
1
vote
1answer
41 views

Extract JSON from Remote Object

There is remote object var case = new Case({Subject:'Test', Status: 'Open'}); How to get/extract json {Subject:'Test', Status: 'Open'} from case reference? Is there some documented approach like ...
4
votes
1answer
143 views

How to Consume JSON Array in Apex REST API Class : Stuck with deserialization Error

I am giving this below JSON array to a REST API-POST Method : So I can insert Account and Contact, but keep getting an error on JSON deserialization of apex parameter. I don't know how shall i go ...
0
votes
1answer
66 views

Why is my Google request denied?

I am trying to integrate Salesforce with Google textsearch in order to acquire a JSON response with desired information. My request is getting denied and I can't figure out why. Any help is much ...
7
votes
2answers
304 views

Handling Large JSON String Values on Visualforce Page

I'm using amcharts to build graph on a visualforce page. The amcharts's input is JSON. So I parse my object to JSON string using JSON.serializePretty. Using this approach, the graph is built fine and ...
4
votes
1answer
102 views

JSON.deserializeUntyped returns “unrecognized token: 'NULL'”, when JSON token has a null value

We're creating our JSON responses to my salesforce callouts in house, so I'm guessing the issue has to do with how we're representing NULL in the JSON response. Here's a snippet of the response SF ...
1
vote
1answer
54 views

How do I refresh an ExactTarget token using the REST API?

How do I refresh an ExactTarget token using the REST API? Is there any good documentation on this?
1
vote
2answers
64 views

Using a variable for a field name in Json stringify

var payload = JSON.stringify( {"Name__c" : data[i].name, "Email__c" : data[i].email } ); How can I do the above one like below. var nameVar = "Name__c"; var payload = JSON.stringify( ...
3
votes
1answer
124 views

Most efficient way to transform AggregateResults to String, Object Maps

Question: What is the most efficient way to transform aggregate results to string object maps? Constraints: The keys of the aggregated results are unknown. The transformation has to be performed as ...
7
votes
2answers
189 views

Parse JSON into Lead

I'm trying to parse a JSON response and create Lead records from it. The JSON is basically formatted as follows. Note, that this is not the complete data being parsed but is the general format of ...
3
votes
0answers
48 views

JSON.serialize alternative which support more objects like HttpRequest or Schema Describes

Often I need a easy and robust way to convert huge nested data structures into an string. Mostly for dumps, logs and debug. JSON.serializePretty() comes close but does not support all Object types ...
0
votes
0answers
25 views

Tracking Triggered Event on Exacttarget

How can we track Fired Event of Journey Builder? We are firing an event via JSON (insert data, evaluate and send email) and getting "{\r\n \"eventInstanceId\": ...
4
votes
2answers
98 views

JSON.DeserializeUntyped: Can I infer anything from the Object returned?

Given a JSON response from a remote API call, I can use JSON.DeserializeUntyped to get an Object, which can then be cast to another type as needed. For example: String jsonResponse = makeAPICall(); ...
3
votes
2answers
295 views

Simple way to generate object from JSON that return from Google Geocode API?

I receive JSON file from Google API Geocoding.Refer to JSON file here.Is there any other easy way to extract the data from this JSON in Apex?I want to retrieve a state value and result status code ...
5
votes
2answers
396 views

replaceAll() \r\n in a JSON serialized string

I can't get replaceAll to work on the '\r\n' sequence in a JSON serialized string. I am serializing a Map object that contains long textarea fields with newlines. I need to change '\r\n' to '\\r\\n' ...
5
votes
2answers
148 views

How can I serialize an object to JSON without properties that are null?

To communicate with a REST interface on a private system, I need to send a JSON message from a trigger. I have a message object that has some fields, lists and a child object: public class ...
2
votes
0answers
66 views

How to set sort order for report called by analytics api using json/ajax

i try to change the sort order of a report called via analytics rest api. For grouped reports there are sortOrder attributes in the grouping section, but i have to call a tabular report. If i call ...
2
votes
1answer
55 views

can exact target connect to a 3rd party web service?

Can exacttarget be configured to connect to a 3rd party webservice returning a JSON object? I guess there are two questions: - can I cause exacttarget to connect to a 3rd party webservice to populate ...
1
vote
2answers
88 views

How to construct the nested JSON

I am using following code and could you please let me know how to construct the nested json. public String getJsonString() { String str = null; JSONGenerator gen = ...
1
vote
1answer
239 views

How to make the context menu for the below code.

I would like to construct the tree view using the JSON with Two object(Account & Contact). root node is the account id and sub node would be the contact(nested level). Treeview: ...
2
votes
1answer
166 views

Parsing JSON with nesting and Arrays

I'm kinda of new to APEX code and working with JSON and I'm trying to figure out how to parse out nested JSON with Array's. This is a basic pattern of the JSON we have coming into our custom field ...
0
votes
1answer
332 views

How to create new record from jstree using json

I would like to create the record from the jstree using context menu. Please help to resolve my issue: My Code: contextmenu : { "items" : function (node) { ...
1
vote
1answer
265 views

JSON Deserialize Byte Array

I'm porting over a rest client from .NET to Apex and in the class that gets initiated by deserializing the JSON response, there is a byte[]. C# Example: public class MyResponse { public ...
0
votes
0answers
39 views

StreamingAPI response has error

I have StreamingAPI it working properly.It some time response has error at the time response JSON Object as error.The log file response contains error below Wed May 15 08:33:07 MST 2014 : Waiting for ...
4
votes
1answer
215 views

Can AMPScript parse JSON?

Using ampscript to parse an XML feed. Client is switching to JSON. Is there something similar to buildrowsetfromXML for JSON in AMPScript? I am confined to using the members login area and not an ...
4
votes
2answers
561 views

JSON.deserializeUntyped() not parsing the whole JSON

I am trying to parse a complex JSON String using JSON.deserializeUntyped(). It parses the first level elements correctly but the second level elements come back as type ANY, even though I am expecting ...
2
votes
1answer
132 views

Giving new field names in wrapper classes for JSON deserializing

Here is the JSON structure: { "public_index": [ { "index": "wiki_eng", "type": "content" }, { "index": "wiki_fra", "type": ...
5
votes
2answers
174 views

How to remove attributes before JSON is sent from Custom REST Apex?

I get back JSON like the following: { Id = a0Ef0000002TPKVEA4; Name = a0Ef0000002TPKV; attributes = { type = "Market__c"; url ...
4
votes
2answers
831 views

JSON Exception unexpected character

I am doing a callout to a google script which takes in address and returns back geographic information (lat, lng etc) in the form of JSON string. The problem is that in the returned JSON string " is ...
10
votes
1answer
112 views

Comparison fails when converting Opportunity from/to JSON

I am facing an issue when converting an Opportunity to and then from JSON. If I put that in a test, the assertion fails when comparing both Opportunities. Here is my code: Test case: static ...
0
votes
1answer
468 views

How to Using JSON with visualforce

I'm new on visualforce and JSON, and I have a page that have many inputFields want to insert them by clicking on save, and get them back on click on edit button for example, I searched on google for ...
0
votes
1answer
277 views

possible ways to insert multiple values of the same field

I have an Object with RecordNum, RecordVal, And User__id as a reference .. and a VF page as the following <apex:pageBlock> <apex:inputField value="{!Object.RecordVal}" label="val 1:" ...
3
votes
2answers
342 views

How to retrieve just the text without formatting from a rich text field using JSON?

I am querying a rich text field that contains text information using a public rest service using this method ...
2
votes
2answers
96 views

How get all objects and their fields as Json

By means of Schema.getGlobalDescribe.Values () getDescribe ().getName () can receive names of objects.With Using method getDescribe().fields.getMap() we can get fields of object. It is necessary to ...
3
votes
2answers
209 views

My custom REST endpoint is returning double encoded JSON. How can I make it stop?

Here is my current controller: @RestResource(urlMapping='/monitor') global with sharing class TheController { @HttpGet global static String doGet() { Map<String, Object> ...
0
votes
1answer
675 views

How to get Json response without rest api and parse the response in objects

I need to get json response and parse the response into the object(Without using http callout).I need to have application(class) which can get response from other callback url and parse that response ...