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

how can i get products from the below json [on hold]

{ company=test, email=test@gmail.com, products=( {product_name= Product Two, product_price=1.2, product_qty=1, total_cost=1.20}, {product_name=one, product_price=2.1, ...
4
votes
0answers
31 views

deserializing JSON to object: different behavior in unit test vs API?

So let's say I've got a class that looks like this: public class APIParams { public String name; public String category; public Boolean taxable = false; } Then I have a ...
2
votes
1answer
37 views

How can I Deserialze JSON Object and save them to salesforce

I have the following JSON reponse format. I would like to save only specific information on salesforce i.e. all the user details, description, zip code, location, request_status, space and state: { ...
0
votes
1answer
21 views

Trigger to make @future callout to the Data.com match API

My company uses data.com premium. We want to create a trigger that will update a lead based on company information since the out-of-the-box functionality only matches based on the lead. (contact). I ...
0
votes
0answers
16 views

Weird Response from SFDC on calling create Resource URL

I have a JAVA program to use the Create REST Resource. It's working fine and able to create the records. However, I am getting a weird Json reponse from salesforce after record created. ...
0
votes
1answer
35 views

JSON deserialization problem; Invalid conversion from runtime type LIST<ANY> to LIST<type>

I'm running code in Execute Anonymous String responseLite = '[{"candidate_index" : 0, "delivery_line_1" : "address goes here", "input_index" : 0}]'; ...
0
votes
0answers
17 views

Test if String is JSON without actually deseriazing / inserting data

I want to find out if a given String "would" be deserializable without actually doing it. Is there a way to do that ?
0
votes
0answers
10 views

Convert <sf:> tags to another formats

I am new to SF so I don't know much more about it, I am getting a record from SF api for a call details of a number so it returning me data in tags like I am unable to get data from these tags, ...
1
vote
1answer
60 views

Having trouble deserializing a JSON object that contains SF Ids

I am using an geocoding API called Geocodio to process a batch of addresses. I felt I had a good handle on deserializing JSON arrays, but am having trouble deserializing a response that doesn't have ...
1
vote
1answer
46 views

How to deserialize json string to Apex

I have a requirement, where I have to select some value from multipicklist and then send this json response to the server. There are 2 scenarios: 1st Scenario: when we are selecting and ...
3
votes
1answer
45 views

Give lookup field External Id in JSON request

I am using standard create Rest resource to create an contact record in sales force. In json , I am matching the Label name in request with SFDC custom field name , so SFDC do the mapping for me ...
1
vote
1answer
30 views

deserializing JSON returns a null ojbect

I'm trying to deserialize a JSON response into a list, so that eventually I can iterate through the list and create new contacts from the response. This is my first time working with APIs and JSON, ...
1
vote
1answer
32 views

JSON.deserializeUntyped is not working with map set, error : Method does not exist or incorrect signature

I am trying to convert JSON data into a map set, but I tried so hard without any result. Here is my code Map<String, String> m {set; get;} m = (Map <String, String>) ...
1
vote
1answer
52 views

How to convert SObject to JSON in APEX or the reverse

I have a stored data as JSON and I want to convert it to object in order to fill a <apex:pageBlockTable> with it. Is there a library I can use like GSON library ? Or what is the best thing to ...
1
vote
1answer
53 views

REST API: How to insert values for picklist and lookup field types?

Introduction Hello, I'm working on synchronising data from a MySQL database into Salesforce using the REST API. I've got as far as inserting basic text values, but for complex field types such as ...
3
votes
2answers
94 views

Json Getting Sorted when serialize the wrapper class object

I have to send JSON request to external system. I have created a wrapper object and defined the variable. However, When I am serializing the wrapper class object , it's sorted the JSON request. I ...
4
votes
3answers
95 views

Problems parsing JSON in APEX

I am calling a REST endpoint (of another Salesforce instance) and I am getting the following response: [{ "attributes": { "type": "Job__c", "url": ...
0
votes
0answers
14 views

Batch apex error “Apex CPU Time limit exceeded error” [duplicate]

I have created batch apex class to insert records into salesforce but i got an error i.e."CPU time limit exceeded error" Please help me to solve this error. global virtual class InsertProductData ...
2
votes
1answer
26 views

JSON.createGenerator(true)

I am creating a JSON generator that returns the created object to be parsed in a different method. However when I am creating a field using the writeStringField method of JSON with a value of null, it ...
-1
votes
1answer
40 views

why we need to serialize and deserialize

why we need to serialize and deserialize? Why don't we save the value directly into database with out serialize. What is the benefit for doing serialize. I know that by doing serialize it will get ...
1
vote
1answer
72 views

Batch apex error in apex job : Exceeded max size limit of 3000000

Using Batch apex i am trying to Insert new records in to custom object from json string in salesforce from API url. When my batch apex class run i got this error in apex log. please explain me
0
votes
0answers
18 views

Batch Processing: “Read Timed Out” Error

I am trying to add records from API URL using batch apex in salesforce. I got an error while running batch apex. Please help me to solve this error.
0
votes
2answers
49 views

building an sObject from a json string in VF page

How can I deserialize a JSON string into an sObject in a VF page? I don't want to use a controller so I'm looking for the right approach to do this on the client side only. Any ideas?
1
vote
1answer
119 views

Using Batch apex Insert new records in to custom object from json string in salesforce

I am trying to insert json data in to salesforce objects. Json string is too large so i am using batch apex to insert data. For this I had written apex class i didn't got any error But records not ...
2
votes
1answer
40 views

getting the query result in json format when working with sforce.connection.query

I have this javascript code in a VF page where I'm trying to fetch records from the DB. I'm getting back an xml format but I need it as a json format. Is there a way to get the result records in json ...
0
votes
1answer
70 views

Insert new records in to custom object from json string in salesforce

I am working with the new JSON Parsing functionality, I have API URL that contain json string.I have created one VF page that displays JSON string data in pageblock table in record format from API ...
0
votes
0answers
24 views

using apex trigger to write in G Drive : Authentication process

I develop an apex trigger that creates folders and a file in my company's Google Drive. I have issues with setting the authentication process. Here's google's guide on how to do it : ...
0
votes
1answer
309 views

How to make <apex:inputText> field as read-only using js/jquery

I have a requirement like, when the end user clicks on the list of users, then an input text field should get populated. the input field should be non-editable. lets say the input field value is ...
3
votes
1answer
97 views

Apex Webservice returning **Unexpected parameter encountered during deserialization:**

I have a webservice, and I'm trying to send a List of Apex classes to my SFDC org. Before I even get anywhere in my POST method Salesforce just returns an error. Sample JSON: {"FieldParser": { ...
3
votes
1answer
19 views

Sending Contact Information To External Site With AJAX

I am working on a website that is using Salesforce for membership management purposes. Salesforce is the single repository for membership information and needs to be able to send membership ...
0
votes
0answers
34 views

How to name number property for JSONGenerator

In the PayPal REST API, there is a credit_card object which has a property called number. Unfortunately, "number" is a reserved keyword in Apex, which means that I can't simply name my property number ...
0
votes
3answers
86 views

Json response getting truncated when getting from Salesforce

I am facing a peculiar problem where, I am querying an external webservice using HTTP Rest APIs, and getting a Json response. Now the problem is when the response payload is large, a chunk of data is ...
0
votes
1answer
69 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
70 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
31 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
44 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
52 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 : ...
5
votes
0answers
481 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
137 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
72 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
138 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
40 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. ...
7
votes
2answers
110 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
180 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
41 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
21 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
74 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, ...
2
votes
1answer
71 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
509 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
135 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 ...