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

1
vote
0answers
6 views

Analytics - Multiple List Widgets and Raw Data Tables - how to filter on both?

I have a dashboard with two list widgets (Account and Opportunity) and two raw data tables (Opportunity Detail and Order Detail). I have used SAQL to group data and then populate the first table ...
1
vote
1answer
37 views

Why is Salesforce metadata in XML format by default and not JSON? [on hold]

When I explore the metadata from Salesforce page layouts, workflows or objects via an IDE, the metadata is all in XML format. Why is this? Why would the metadata not be in JSON, for example? Is XML ...
0
votes
0answers
26 views

Unexpected parameter encountered during deserialization

I am trying to write a REST service which will send SF objects between Orgs. Right now, as a test, I am sending data to the same Org that it is coming from. I wrote a GET request which worked so I ...
2
votes
1answer
18 views

Unrecognized field “attachment” when POSTing a Chatter FeedItem with a file

I'm attempting to create a new Chatter FeedItem using the Salesforce REST API. I'm constructing a multi-part request with the following parameters: { "feedElementType": "FeedItem", "subjectId": ...
0
votes
0answers
29 views

JSON deserialize for parent child relationship [closed]

I receive a JSON response for my POST Method to an external URL as below: { "status": "ok", "data": { "account_id": 20164, "added_Test": { "test_ids": { ...
0
votes
2answers
28 views

Illegal assignment from Object to Decimal

Here is the code which I'm using for deserialize a JSON response. Opportunity opp=[select Id,Name,Account_Id__c,Sync__c from Opportunity where id=:opptyid]; Map<String, Object> m = ...
0
votes
1answer
25 views

Handling JSON response using JSON.deserializeUntyped or JSON.createParser

I have following response from my POST method to an external webservice URL. JSON Response: { "status": "ok", "data": { "Testid": "1234" } } Here is the wrapper class: public class JSONParser ...
0
votes
1answer
22 views

deserialize json string to list of wrapper

How can i deserialize a json string into a list of wrapper in apex ? here is my code : public class PageLayoutErrorMsg{ public String errorId{get;Set;} public String ...
1
vote
1answer
28 views

JSON.deserialize adding time

CalEvent calEvent = (CalEvent) JSON.deserialize(calEventJson, Technician_Dispatch_Util.CalEvent.class); System.debug('OGDEBUG TDU calEventJson '+calEventJson); System.debug('OGDEBUG TDU ...
0
votes
0answers
22 views

AngularJS Json parsed data working in local machine but not in VIsualforce page.

I have two json files with cities and stores information. I need to show them in a typical grid format. For that i have used angularJS to fit the design. Now i executed the solution from local xampp ...
0
votes
1answer
29 views

Keep a history of Clicktools survey responses

The Use Case Part of our operation is collecting survey data from our Accounts. We currently do this using Clicktools. Our users would like to track the responses these Accounts give over time. ...
3
votes
1answer
33 views

Include JSON string in JSON object

I have an Apex class similar to this: public class MyDTO { public SomeComplexObject data; public String reportRow; } Where the String reportRow contains a valid JSON String. The DTO object ...
0
votes
0answers
4 views

JSON files and Google Tag Manager

Wondering if anyone has any advice on how to add an event tag via Google Analytics into links driven by a static resources JSON file. I'm assuming we add the tag into the coding on the developer ...
0
votes
1answer
43 views

How to access nested JSON (sub-objects) in data

I'm using the dataobject tag to parse JSON that is in a variable as described by: https://help.exacttarget.com/en-US/documentation/guide_template_language/parsing_json/dataobject_tag_examples/ How ...
1
vote
0answers
18 views

Encoding Issue? HTTPPost ampscript function response insert into data extension

I'm using the HTTPPost ampscript function to send a Json payload to an endpoint and receive a Json response back. I get the OK response back, but the Json response contains Chinese, Japanese and other ...
0
votes
1answer
26 views

Check for a string using .contains()

Below is the code which works perfectly for normal strings. But when I pass Json.serialize result as string, below method is not working. list<case> c = [select id, casenumber from case limit ...
2
votes
1answer
79 views

Write if condition for stringfields in JSON Generator

There are group of fields I am querying and putting them in JSON. Some of these fields may be blank which is making previous test classes fail throwing a nul pointer exception. **Present Code ** ...
2
votes
1answer
34 views

Prepare JSON string to post data to a RESTful webservice

I am doing a callout to RESTful web service and following the example given here in Integration workbook My actual requirement is to query for some values and post these values in JSON to webservice. ...
0
votes
1answer
22 views

Changing property names when serializing JSON [duplicate]

Is there any way to set the name of the serializable field? I'm trying to work with JIRA webhooks and I ran into an issue where their request package contains a field that is a protected keyword in ...
1
vote
2answers
31 views

Unable to access class variables inside for loop [closed]

Not sure how to assign c.accountId to accountId inside myList. Also please suggest when to use {get;set;} for variables. I have seen some forums using it and some not. My requirement here is to post ...
0
votes
1answer
30 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
27 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
17 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
48 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
39 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
38 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
72 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
82 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": ...
1
vote
2answers
51 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
28 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
56 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
70 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
267 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
87 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
97 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
62 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
61 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
33 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
38 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
86 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
52 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
42 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
82 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
279 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
32 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
31 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
127 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
36 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
240 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
24 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: ...