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

How can i get search string with space using JSON?

I have created a class using API end point URL, While getting its response we are able to observe blank spaces in the output string which should not be present. Please help me out with a solution. ...
1
vote
1answer
14 views

Extra Backslash in Json String when exposing webservice

I am creating a middle ware in Salesforce. The external System1 calls my SFDC org and I call external system2 from SFDC in turn. The external system2 gives me Json string like ...
-1
votes
1answer
14 views

Initial term of field expression must be concrete SOject: Id

Preparing a class that can post certain fields on opportunity in JSON format but running into the error "Initial term of field expression must be concrete SOject: Id" public class oppTrigClass { ...
0
votes
3answers
38 views

How can i concatenate json format using parse

I have created API URL for using autocomplete functionality as I give address in text box it display the related list of addresses. I need concatenate some address fields such as city, postcode, city ...
0
votes
1answer
29 views

String.valueOf((String)jsonBodyMap.get(pfield))) is retuning null from the JSON object

Hi im trying to fetch the string value from JSOn object dynamically and its retuning null, works fine if i specify the field names but i dont want to hardcode the field names want to pass it pass it ...
1
vote
1answer
35 views

How can I avoid brace and bracket in JSON?

I have requirement for API URL that URL containing for list of address using JSON format. The example for if I click France country it display the France address details only but am getting for ...
0
votes
0answers
40 views

Picklist list values not getting selected in the text box?

I have used JSON parsing to autocomplete values in the text box. Drop down values are listed below the text box. When I select a respective value, its value not appearing in the text box... Please ...
2
votes
1answer
51 views

Dynamically serialize or deserialize properties in apex

I want to have dynamic properties in my JSON structure, something like this - { "payload": { "one": { "x": 1 }, "two": { "x": ...
-2
votes
0answers
21 views

How can i get json format using end point url in rest api

Hi I have tried this url(http://api-adresse.data.gouv.fr/search/?q=8%20bd%20du%20port&postcode=44380) in workbench I getting error service not found.is it possible to get JSON format in workbench? ...
1
vote
2answers
32 views

how to serialize JSON and send it through Trigger every time edited and inserted?

I am just curious to know how to send JSON data with post method using @future call-outs to external system with a trigger (for after insert and update) , any one can help me to show some example on ...
1
vote
2answers
26 views

Read a summary report and based on each grouping value populate a VF page that will serve as attachment to a email?

I am working on a requirement where i have to read 2 summary reports and combine them based on some logic. I am able to get the response and written that response in a map, where key is the Summary ...
1
vote
1answer
47 views

How to call an Apex class method from a different apex class? and its related to JSON

i wanted to know about JSON apex calls, I have a "integrationhelperJSON" class who already to wrote integration class to store JSON values and to parse everything , right now I have a VF page - ...
0
votes
1answer
38 views

REST API calls from salesforce and parse the JSON to display on the vf page

I have to make REST API call from salesforce to a HTTP URL GET method to get the JSON response parse it and display it on the vf page. My Questions: From the class below how can I check the status ...
3
votes
1answer
175 views

Convert Byte Array/JSONArray to Base 64 String via APEX

We are calling an External WebService that is returning us the JSON Object. In that Json Object they are sending the PDF as ByteArray(JsonArray) not as Base64 String. So am thinking is there a way to ...
1
vote
2answers
51 views

JSON Serialization with nested relationships among multiple objects

I have 4 objects(Account,custom1, custom2, custom3) with the following relationships: Account and custom1 has master detail relation. Custom1 and custom2 has lookup relation. Custom2 and custom3 has ...
2
votes
1answer
81 views

Handling hyphens in JSON deserialization

I am trying to use public REST API that that has hyphens in variable names. Apex does not support variable names with hyphens. JSON2Apex tool generates kind of strange class as well. I was facing ...
2
votes
1answer
46 views

JSON Serialize vs JSON Generator

I have a build a REST API @HTTP POST using apex class and I was able to serialize the account info for the specified columns. @RestResource(urlMapping='/test/Netsuite_api/*') global class ...
0
votes
0answers
51 views

Removing a duplicate element from a JSON Array

I'm trying to figure out a way to dedupe JSON arrays based on the _prop.Invoice_Number__c value returned by a Remote Object retrieve. Please see attached screenshot of the JSON as viewed through a ...
0
votes
1answer
28 views

Calling JSON.deserialize() throws “System.NullPointerException: Attempt to de-reference a null object”

I'm trying to use the System method JSON.deserialize(jsonString, apexType) to deserialize the body of an ApexRest POST request. My code compiles, but at runtime I'm getting a ...
1
vote
1answer
31 views

change JSON array to normal form

I have the below JSON POST callout class. The data is sent in an array format whereas the destination requires it in just normal format. please suggest to remove the array in this code an execute in ...
0
votes
1answer
69 views

Parse nested JSON

I need to parse this JSON, and then insert the values into a parent object, and then a list of child objects into the detail page of the parent. I'm having trouble with a few issues: I am unable to ...
0
votes
1answer
37 views

JSON single quote exception while testing REST service using Postman client. Any suggestions?

While testing a REST service i am getting a JSON parsing exception as given below. [ { "errorCode": "APEX_ERROR", "message": "System.JSONException: Unrecognized character escape ...
1
vote
0answers
37 views

Trigger send emails from SF CRM vs, SFMC

Situation is having a SF CRM in place where a JSON call is kept at the lead/contact level. This JSON is requested by a CMS to change a website. When triggering an email of the SFMC Contact or Lead ...
1
vote
1answer
67 views

Sending a rest callout using JSONGenerator?

I am triying to send a callout using JSONGenerator in salesforce but I am having difficuty in putting the things through using .write methods. Any help will be great. { "request" : { ...
3
votes
1answer
195 views

Parse JSON Response and add to Visualforce Page

I have this JSON Response, and I'm having trouble trying to figure out both the JSON.deserializeUntyped and JSON Parser. My ultimate goal is that I need to parse the JSON, then take each value and ...
1
vote
1answer
29 views

Replace original record with another on during After / Before Insert

Imagine the user clicks a standard New button of a custom objects, populates some fields (in a Standard Layout) and then clicks save. He then is redirected to the View page of this new record, but is ...
2
votes
1answer
27 views

Get tab delimited data from the XML node

I am doing a web service call and get XML response back. I need to extract the data within the XML node and create a map out of it. The issue is not the XML but the way the data is present in the ...
0
votes
0answers
77 views

Export Parsed Data To CSV Format From Visualforce?

I re-titled this so as to make it simplaer in concept - JSON is not directly the issue, it's the ability to export data that appears in a VF page. We have a situation where, when Leads (or Accounts) ...
1
vote
1answer
29 views

How to access the get; set of a inner class after using JSON.deserialize in salesforce apex

So I am getting a response as jSon for which I created the class: public with sharing class TurboBrigeResponse { public responseList responseList{get;set;} public String authToken{get;set;} ...
2
votes
1answer
135 views

JSON String to custom object list

Here is breakdown of what I am trying to achieve Read List of questions from a file uploaded by user Convert it into JSON format Create a List of custom object Insert this list into database I ...
0
votes
0answers
22 views

HTML Dependent dropdowns based on a Data Extension data from the Marketing Cloud

I am trying to create a Marketing cloud microsite with dependent dropdown lists. The information is store in a Marketing Cloud data extension. I am not able to make it work. This is sample of code: ...
1
vote
1answer
46 views

What should be a good aproach to retry a web service callout?

Today i recived an exception mail saying this : Exception Message: Upsert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] ...
3
votes
3answers
247 views

How can I write a valid JSON format when I want to pass variables in it?

Following is the valid JSON format: String json = '{'+ ' \"A\": \"Value of A\",'+ ' \"B\": \"Value of B\",'+ ' \"C\": \"Value of C\" '+ ...
1
vote
0answers
45 views

Best way to parse “stringified” (sub-)Map<String,String>

In my Auth Provider RegistrationHandler, I received an instance of the Auth.UserData class, filled with users data (in this case it is an external Salesforce user). The usage is very comfortable, as ...
1
vote
1answer
81 views

JSON Unexpected character ('P' (code 80))

I'm working with JSON and I got this error when the page deserializes it: Unexpected character ('P' (code 80)): was expecting comma to separate OBJECT entries at [line:1, column:4074] I write you ...
0
votes
1answer
44 views

Encrypting the JSON request send to external system

Just want to know , if there is way to encrypt the json request that we send to external system. I am integrating with few on-premise external systems and there is ask for encrypted json request from ...
2
votes
0answers
140 views

Remove leading and trailing white space from dynamic JSON in angularjs

I am facing issue while fetching JSON string dynamically using angularjs. Here is one instance where I am facing this issue - If a user enters any value on the UI in a textarea as follows: ...
2
votes
0answers
43 views

My VF page is loading both Mobile & Desktop view

I am using JSON to populate data tables in my page. very Strangly, it's loading the data in both Mobile & Desktop view. Can anyone help me with this? Attaching the screen shot. PFB the code ...
3
votes
3answers
457 views

How can data be extracted from this kind of JSON format?

How can "orderDetails" be extracted from the following JSON payload? { "itemId": "111", "count": "20", "bookOrders": [ { "bookName": "book1", ...
5
votes
2answers
233 views

Deserialize JSON Array With Integer Index

I am trying to avoid having to do a JSON deserialized untyped, but not sure if I can... I get back a response of contact data from a third party that looks something like this: {"data": { ...
4
votes
2answers
99 views

Can you send json from VisualForce to Apex and have it be valid?

I have this JSON object that I've gotten from the front end. I want to send it to Apex and finally send it to my external API. Visualforce: ct_4_sf.RecordingTest.saveVideo( data, ...
2
votes
1answer
72 views

Triggers & JSON!

I am trying to run a future method from a trigger. As the future method takes only primitives as parameters, i am serializing the Trigger.new to pass it to a future method. I am deserializing the JSON ...
2
votes
0answers
40 views

Am I doing it right with this function sforce.interaction.searchAndScreenPop

We are new to SalesForce integration and we are up to integrate our company softphone with salesforce. We are using the sforce.interaction.searchAndGetScreenPopUrl for popping up the matched object. ...
3
votes
1answer
68 views

Display List of Objects in a VF page not working as expected

To put you on perspective, I've created a Detail Page Button that displays in a new window some result data from a callout to a SOAP web service. The thing is, I've tried it in a sanbox, and it works ...
1
vote
0answers
54 views

Google Timeline Rerender problem

I'm trying to include Almende's Google Timelines (Link to documentation) and I'm having some trouble rendering the timeline after the first time. I'm using JSON to fill in the data which is computed ...
0
votes
0answers
53 views

JSONGenerator writeObject() generates private properties

I have an Apex Class with some public properties and some private properties. When I use JSONGenerator.writeObject(foo), private properties are written into the JSON string. My code is below. public ...
2
votes
1answer
181 views

Storing JSON response in SF text field gives '&quot;' instead of double quotes (")

For debug purposes, I'm trying to write the JSON body returned from an HTTP callout into an SF text area field. My problem is, despite the JSON body being stored as a string variable, and despite it ...
0
votes
0answers
32 views

Continuous Webservice call from Developer sandbox to QA sandbox

We wanted to implement a functionality that would fetch data from QA to Developer sandbox for testing purpose. For this: I created a VF page that has only two fields, the first dropdown shows the ...
3
votes
1answer
166 views

System.JSONException: Apex Type unsupported in JSON: Object

I was trying to parse json to apex but i was getting System.JSONException: Apex Type unsupported in JSON: Object My apex code was public class patdetils77 { //public String strBody{ get; ...
1
vote
1answer
140 views

Deserialize JSON to Map - EchoSign REST API response help

I am making a call to the EchoSign REST API and I need to get the signing URL of the most recently signed document using an EchoSign query. I am using the following: HttpRequest req = new ...