Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [json]

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.

0
votes
2answers
18 views

How print return value in debug - return (WS_BankStatementResponse) System.JSON.deserialize(jsonReplacedString, WS_BankStatementResponse.class);

public static WS_BankStatementResponse parse(String json){ String jsonReplacedString = json.replace('"date":', '"startDate":'); System.debug('String Replaced : '+jsonReplacedString); ...
0
votes
1answer
26 views

How to deserialize JSON?

I have an issue which I've been struggling with today. The JSON is returned back to me with a project Id as the key, this Project Id is dynamically generated and due to this I have not been able to ...
0
votes
2answers
21 views

Parse JSON using APEX provided JSON Methods

Salesforce rockstars! I'm in need of some help, and thank you in advance for taking the time to review my question! I'm pretty new to Java/Apex, and most of the work I do is with internal Salesforce ...
2
votes
1answer
22 views

Unable to fetch complete records from bulk query batch result

I am using simple-salesforce python library using REST to call bulk services which is working fine till calling but for large dataset library continuously poll the batch status and spit all result (in ...
0
votes
1answer
23 views

Salesforce JSON not passing as UTF8 to external REST API

I'm trying to send a JSON to an external API in UTF-8 but the vendor tells me it's coming through as garbage. I've set the following headers: for(JSONObj.workflowRequestTableFields wfField: wr....
0
votes
1answer
20 views

How to Deserialize the Trigger old & newMaps in JSON

I'm trying to pass the old & newmaps as arguments to a future method using JSON method. I see the below error when it tries to deserialize the data. reference-Passing SObjects to Future |...
0
votes
0answers
8 views

Einstein Analytics data binding to boolean value

I am trying to conditionally hide tabs based on the output of a certain table. Currently I am attempting to set the navigationHidden property of the page to false like so: "navigationHidden": "{{cell(...
0
votes
1answer
38 views

JSON Formatting in Apex [closed]

To summarize very quickly I am building a REST Integration between two Salesforce environments, where I am querying data from the Source and sending them via Callout to my Target, which has a ...
-3
votes
1answer
20 views

Crete a method to replace salesforce keywords in json

I am creating a generic method which accepts json string as input parameter and replaces keywords of salesforce present in json. After replacing all the keywords I am returning the modified json ...
0
votes
2answers
76 views

JSON call using SSJS to populate a dropdown list in HTML and pass it through using AMP

I have a JSON object full of County names and I want to call it using SSJS then populate a dropdown list in HTML using the Data from the JSON. JSON looks like this [ "AZ - Maricopa", "AZ - ...
0
votes
1answer
36 views

REST Integration - JSON Serialization/Deserialization alternative to wrapper class

I am building a REST integration between two Salesforce Environments. One environment will be used to setup and stage Data and when ready the Integration will be able to push data from the src to the ...
0
votes
0answers
16 views

json: how to convert a gmt to local time

hi everyone can anyone know how to convert gmt to local datetime. I want to convert Startdate into local time heres my response and my code` { "response": [ { "...
0
votes
1answer
45 views

Invalid character in identifier

I am getting an error on my JSON2Apex class: Error:(7, 18) Invalid character in identifier: Holding_to_Fund__r Error:(44, 19) Invalid character in identifier: Holding_to_Fund__c I need to parse ...
0
votes
0answers
15 views

How to debug type mismatch for serializing json into apex objects

I am using JSONtoApex to create apex classes from a json resp. However, the converter seems to be failing at a data point (possibly multiple data points) and i need to find a goodway to find out which ...
-3
votes
1answer
48 views

Illegal value for primitive issue in JSON [duplicate]

I have following JSON Format lstSelectedIds--> [{"Id":"a0k1k000000QTPrAAO","Name":"00006144","User__c":"0051k000000wvYAAAY","User__r":{"Name":"Wissam Mahmassani","Id":"0051k000000wvYAAAY"}},{"Id":"...
0
votes
0answers
14 views

Wave Analytics JSON Filter SAQL

I have a problem when editing a SAQL in wave. When I edited SAQL and update the chart the curreny symbol and comma is remove. Is there a way to add the currency and the comma. What I already did is ...
-1
votes
1answer
22 views

Preserve the String as it

This string is part of a JSON that I have. I am trying to store the JSON string that was generated using JSON.serialize method. Part of the JSONString has "default_value": "\" \"" as one of the JSON ...
0
votes
2answers
93 views

Unexpected file found in package directory: force-app/main/default/lwc/jsconfig.json

I have create a sfdx project and working on to migrate a VF page into lightning web component. At the first I have created the LWC components and pushed it to the scratch org, but now I am having ...
13
votes
1answer
622 views

Can create an Instance of Abstract Class, Salesforce Bug?

I was playing with Apex and stumbled upon this. Created an Abstract Class and made the constructor as private, so that noone can create an instance of it. This works just fine during compilation. it ...
0
votes
1answer
46 views

Unexpected character ('\"' (code 34)): was expecting comma to separate OBJECT entries [closed]

String json = '{'+ '\"FamilyMonthlyIncome\" : \"75000.00\",'+ '\"Doyouhaveyourownhouse\" : \"Yes\",'+ '\"SaralJeevanChannelAccess\" : \"Yes\",'+ '\"Remarks\":\"Good\", '...
1
vote
1answer
27 views

How can we convert XML to Native Objects when the XML includes “Date” and “Time” as elements?

I'm currently trying to determine whether we can replace our company's convoluted XML processing solution (based on XPath) with one based on @SfdcFox's XmlToJson solution. Unfortunately, the XML we ...
0
votes
1answer
54 views

Deserialize json request error - unexpected character

I am getting this error when trying to deserialize an HTTP response - hope you can help: FATAL_ERROR System.JSONException: Unexpected character ('<' (code 60)): expected a valid value (...
0
votes
1answer
20 views

Trouble writing Help Class for JSON de

This test class is driving me crazy. I have can prove an array is passing through the class from the test class, but I can't seem to get code coverage. I did use the Json2Apex tool to build the class. ...
0
votes
1answer
23 views

Json2apex - Message consuming unrecognized property

I am not able fetch all details for message & text fields node. Getting error as: Message consuming unrecognized property: name, Message consuming unrecognized property: userId, Message ...
0
votes
2answers
48 views

Test method for request in JSON Format

Malformed JSON: Expected '{' at the beginning of object @HttpPost global static Void doPost() { //Initailizing variables String respString =''; ...
0
votes
0answers
8 views

Format number widget in analytics?

When using a number widget in analytics, it doesn't diplay the decimals the number may contain. The original SAQL query retireves the number with decimals, but when it's displayed on the widget, the ...
0
votes
0answers
20 views

Can I use @Httppost and @Httpput on the same method

I want to use 1 method regardless of whether the request is sent as a Post or Put (upsert). So, if the request has an Id field populated, it will update the record, if not it will insert. Can I just ...
1
vote
0answers
46 views

GTL Json data looping

I have a GTL code that loops through my JSON code. In the JSON string i have several order data but in each array there is the same adress information like so: [{ "name":"This is a name", "sku":"8547"...
1
vote
2answers
36 views

Deserialize JSON Body into two different Lists of own classes

I'm writing an REST PUT request that takes in an array of Careers and Degrees from the body and converts them to inner classes within the RestResource class. However, when I am attempting to ...
-3
votes
1answer
67 views

System.SObjectException: Invalid field Name for Contact

I'm Having an Apex Class which I used to deserialize the JSON. I'm calling the function which passed the string and sObject name which is Contact. This is my String which i passed in the function ...
0
votes
2answers
24 views

I need to deseralize this json responce and get the attributes to display in pageblock table [duplicate]

{ "id": "LC-NCLDMHG", "created": "2018-06-12T18:59:00-07:00", "type": "longForm", "source": "Zillow", "price": 70, "sender": { "emailAddress": "testborrower@gmail.com", ...
4
votes
1answer
46 views

How to get a JSON formated snapshot of the current Apex limits with minimal code

I know how to do this technically. Create a class with fields for all Limits and JSON.serialize it. But I thought maybe there is a way to get all limits as map an skip the class writing step. I know ...
-4
votes
1answer
28 views

json:how to get other values of json response and insert in to the other key [closed]

hey guys anyone help me how to get the values from key Request and insert it to the other key or object? "response": { "deleted_users": { "26": { "sfid": "" ...
0
votes
1answer
306 views

How to parse nested objects in JSON response

Im trying to parse the below JSON response: { "preferredLanguage":"en", "preferredLocale":"en_GB", "languages":{ "en":{ "langCountry":"en-bn", ...
1
vote
1answer
44 views

Parsing JSON that can be one of multiple classes

IS there a way to parse JSON without knowing exactly what the class is. For example: I have JSON in the following format: {"id":"381f05c5-b02e-4aa1-8def-c54a6026764a","feature":"Feature1","settings"...
2
votes
1answer
29 views

Problem with JSON element named “number” [duplicate]

I have an APEX class that should have a property named "number" but since this is a restricted keyword in Salesforce, I'm not allowed to do that. I have found a solution where I should name it number1 ...
1
vote
0answers
49 views

GTL conditional display of JSON content based on later values

EDIT: It occurred to me that there is a much simpler, broader way of asking this (or at least very relevant to it): is there a way to pull unique values from a JSON attribute, e.g. within the ....
0
votes
0answers
50 views

Apex Multipart HttpRequest - With JSON and BLOB

I am trying to consume a Google Drive API to create a file in an ApexController. I was successful in creating a file in the root folder without specifying a name using the code below http h = new ...
1
vote
1answer
69 views

Invalid character in identifier in Wrapper class

I am doing a rest call with the below endpoint string endPoint = 'https://test.salesforce.com/services/data/v43.0/query?q=SELECT+Name+,+RecordTypeId+,+Code__c+from+Account'; I have the below class ...
2
votes
1answer
57 views

Using GTL to Display Data from Nested JSON Arrays

I am building an email using data passed through JSON. Here is an example of the JSON file: { "order": { "items": [ { *Other Data*, "tracking": [ { **"...
1
vote
1answer
28 views

Lightning components - Initiating App attribute with controller - Issues with format and transmission

I'm Working on Lightning components I would like to add some values in my App, using its controller (aura:handler) But it doesn't work at all, so the default values of my component is displayed at ...
0
votes
1answer
44 views

JSON -> Apex Custom Class conversion issue

Im attempting to deserialize a JSON string into a custom apex class but Im getting a NULL value back from one particular node "transaction". Any ideas why its not translating from "transaction" to "...
7
votes
1answer
369 views

Deserialize hits memory limit

We have a custom apex webservice in which we do certain operations and later call a managed package apex method that returns a JSON string which we deserialize and send back to the client. For example ...
1
vote
1answer
52 views

Json attribute not showing in Marketing Cloud

I have a Json string and something does not make any sense to me. Here is the problem: I have a Json string with the following attributes in it: [{"MiddleName":"der","LastName":"Emmerzaal"},{"...
0
votes
0answers
35 views

JSON Parser in Apex [duplicate]

The image shows my JSON Parser Value. I've attached my apex code below. While I run that code I'm getting the value which I've lined it in black color. But I need to get the value which I've lined in ...
0
votes
2answers
43 views

JSON.deserializeUntyped to Map<string,Map<string,decimal>>

I am trying to deserialize json to Map< string,Map< string,decimal>>. json { "redrose": { "11-Jan-2019": "$1.85", "16-Jan-2019": "$1.85", "17-Jan-2019": "$1.85", "18-Jan-2019": ...
0
votes
1answer
46 views

Extract values of the object received in the apex method!

I am passing in an object with mutiple rows of data, which eventually will be saved to the custom object. How do I extract the values of the object that I received in Aura enabled apex method. ...
0
votes
1answer
59 views

Deserializing/Parsing the JSON response to an Apex class

am trying to parse the below JSON request to Apex class. The challenge here is that one of the node "match" in the JSON is suppose to be an array but the external system sends it as a String. I would ...
0
votes
1answer
23 views

Error in Json for Rest Api

I have a trigger that sends a certain opportunity to an unspecified stage, so I have a json with the objects, but I intend to send everything in a single string, so I joined json, when I run the code ...
0
votes
1answer
53 views

How to serialize REST Request from Wrapper class for existing Salesforce data?

I am trying to format my SObject data within a wrapper class to POST data to another Salesforce org from a custom Work__c object, but I am having a hard time understanding how to add an instance of "...