Questions tagged [parser]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

Convert or parse datetime coming from external system and save it in salesforce [duplicate]

I am calling a rest api and one of the attribute of the response is datetime which is in CST format(6/26/2023 7:01:50 AM). I tried converting to date time format but its throwing Invalid date/time: 6/...
Sancool's user avatar
  • 43
0 votes
0 answers
50 views

How to specify null value for a currency field in a sfdx cli call

I need to set the value of a currency(18, 0) filed to null. I am using the following command to update the value of Annual_Potential__c field to null sfdx data:record:update -o ,myusername.@<...
sfdx-developer's user avatar
0 votes
1 answer
95 views

parsing trough a JSON html string to obtain key-value pairs?

Im calling an API and after parsing trough the json this is the part I need: "description": "<b>Precipitating Event</b> updated from: to: testing update\n<b>Age</b&...
potato46's user avatar
0 votes
1 answer
128 views

Parsing JSON via GTL and AMPScript in marketing cloud

I need to create an automated email that will be triggered and sent to customer whenever a customer has requested to cancel a number of items within their order. I'm using both ampscript variables and ...
T01's user avatar
  • 5
0 votes
0 answers
19 views

Apex parsing properties with dots in JSON keys [duplicate]

An external endpoint sends this JSON response: { "domains": { "example.com": "ABC", "domain.xyz": "DEF" } } parsing into an Apex class ...
dev4life's user avatar
  • 362
2 votes
1 answer
329 views

How to deserialize a list<Object> without using indexes

I have this JSON: { "Details":{ "Customer Input": "Type Here", "Input Status": 0, "CumulativeValues":[ { ...
Ravi Kumar's user avatar
0 votes
0 answers
59 views

Html Parsing in Apex Class [duplicate]

I have a html template file available as attachment in one of my Salesforce object. It contains a proper html form with input tags and sub templates. Whenever I get a request from third party, which ...
PK SF's user avatar
  • 41
0 votes
1 answer
506 views

Can you deserialize just part of a JSON into an object?

This is more of a concept question than an actual code question but can you deserialize just part of a JSON String into an object or do you have create a class and a sub class for the whole thing. So ...
Jebert's user avatar
  • 15
0 votes
1 answer
3k views

Unexpected character ('\' (code 92)): was expecting double-quote to start field name at [line:2, column:3]

I'm receiving errors which look similar to a previous question (System.JSONException: Unexpected character ('a' (code 97)): was expecting double-quote to start field name at [line:1, column:3])...
RedQueries's user avatar
1 vote
1 answer
399 views

Parsing HTTP JSON Response [duplicate]

I'm pretty new to Salesforce/Apex and I'm trying to extract the information I need from the HTTP API call I make to an external system (like Piwik.pro) and store in list or a map. I want to get all ...
Stojchesky's user avatar
1 vote
1 answer
822 views

How to process papa parse results in apex class

Folks, I want to parse CSV files with papa parse in apex. I have a lwc to upload the file and a custom apex class to massage the data and insert results to custom object. My question is what do I ...
SavvyGoat's user avatar
0 votes
1 answer
85 views

parse case description field in aura component

I have a request to parse the description field and extract multiple values for certain entries such as: username = xxx fname = aaa lname = bbb. Once I have extracted these values they need to be ...
Daryn's user avatar
  • 251
0 votes
1 answer
109 views

Get attribute from RSS feed

Within an RSS feed I am trying to target the img>src from the description tag <description>&lt;img src="https://www.website.com/content/dam/cmegroup/videos/metals-market-...
GerardD's user avatar
1 vote
1 answer
393 views

Problem parsing result from APEX CONTROLLER in LWC

I have a function in my lwc that gets data from Apex Controller. My code: JS: getServiceResourceInfo({srIdList: this.professionalIdList}) .then(result => { console.log('TEST ...
CPS's user avatar
  • 305
0 votes
1 answer
535 views

Parse XML response

I have XML <?xml version="1.0"?> <xmldata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" status="SUCCESS">' + <recordset name="...
Saero's user avatar
  • 5
0 votes
1 answer
360 views

How to remove all unicode characters from a blob?

I have a requirement to parse the contents of a csv blob which has unicode characters. When I am trying to parse it using Blob myBlob = EncodingUtil.base64Decode(response.getBody()) I am getting an ...
Knight of the Vale's user avatar
0 votes
1 answer
121 views

Is it possible to go to aparticular node in a xml?

I am wondering how can I search a node once I parse an XML, I need to go to the node (attached at the end of the question) "data-block" and loop through all the children to extract the value ...
manza's user avatar
  • 1,945
0 votes
0 answers
30 views

Parsing JSON Response Issue with escape characters [duplicate]

Below is the response from an external system. In Salesforce, I need to save the value of test1. Now JSON Parser it trying to destruct the test1 value also because it has escape character before the ...
Vamsi Krishna Mopievi's user avatar
0 votes
1 answer
883 views

External Service - Parsing XML/JSON

I am trying to implement an integration with a third-party system to Insert Products into Salesforce. I have created the External Service, consumed the schema, and was also able to make a call to the ...
SFDCLearner's user avatar
0 votes
1 answer
838 views

How to parse this json into apex list of strings containing SpecialName values?

Hey fellow salesforcers, Im a bit stuck parsing specific values from a json into an apex List stringList Using apex (with or without using Json2Apex), how can we parse the following JSON structure to ...
Peter Noges's user avatar
  • 1,090
-2 votes
1 answer
367 views

Apex Job Error: can't parse argument number: org

can someone please help me with this issue can't parse argument number: org: This is the Batchable class: global with sharing class IMB_SendPushNotificationsBatchable implements Database.Batchable<...
Šejla Jahić's user avatar
4 votes
1 answer
685 views

SOQL Parser implementation in Apex

In my app, I get passed in user-generated SOQL query strings and need to validate and modify them. For that, I would need a parser that can extract me chunks They contain many SOQL features like: ...
Robert Sösemann's user avatar
1 vote
2 answers
2k views

Handle unknown properties with typed JSON.deserialize()

I am looking for an elegant and unhacky way to handle deserialization of a JSON into an Apex type where some of the properties are known and some are not. Assumption: At least for now the unknown ...
Robert Sösemann's user avatar
2 votes
1 answer
3k views

How to parse large size csv file content into custom object in Salesforce?

I have requirements to implement the LWC file upload wizard which should handle very large size csv file( about 1 GB).. is it doable to parse such large size csv through APEX batch method? I tried ...
Mukesh Korat's user avatar
0 votes
1 answer
592 views

CSV parser to insert records into Custom Object

I have a requirement to insert records into custom object called Custom_Business__c using a csv file which is stored as a static resource. Below is the code I've achieved so far public class ...
S kanth's user avatar
  • 93
2 votes
2 answers
376 views

Deduce Schema.DisplayType from a sample of JSON property values

From a REST API my Apex is receiving a list of JSON objects with previously unknown properties. To store those properties I want to dynamically enhance a Custom Object by adding suitable Custom Fields ...
Robert Sösemann's user avatar
0 votes
2 answers
61 views

How to get value of a record after parsing [closed]

I have parsed an object and want to get a value. How do I achieve this. Its a little confusing for me, is this a list I have to loop trough or an object. My debug shows the following: oldList: ...
Thomas's user avatar
  • 2,298
0 votes
2 answers
285 views

Reading a JSON structure in Javascript

I am trying to read this json string in Javascript so that I can access its node. However I get undefined. const jsonStr = '{"data":"{\"page\":\"1\",\"firstName\":\"c\",\"company\":\"\",\"...
SfdcBat's user avatar
  • 4,751
2 votes
1 answer
2k views

Blob is not a Valid UTF-8 String - Only after "–" [duplicate]

I created a CSV parser that parses CSV's from static resources. I am returned with a Blob is not a Valid UTF-8 String error when parsing the character: "–" different from "-". The "–" is apparently ...
S.B.'s user avatar
  • 2,039
0 votes
1 answer
102 views

Access location in JSON2APEX class from Mapquest JSON

I converted Mapquest geocoded data into an Apex Wrapper using JSON2APEX. Now I need to access the location information longitude and latitude: Mapquest JSON: { "info": { "statuscode": 0, "...
Andrea Voggenreiter's user avatar
1 vote
0 answers
90 views

JSON Parsing Question

I'd like to ask everyone their input on the preferred way to parse a JSON response where the structure varies. I created a class using the json2apex service and it looks very solid. However I have ...
Belacyrf's user avatar
0 votes
1 answer
1k views

ParseJSON Error for HTTPPost - SSJS Unable to retrieve security descriptor

In my marketing cloud, landing page. Getting the error "System.InvalidOperationException: Unable to retrieve security descriptor for this frame" while trying to Parse the JSON response in a HTTP Post ...
sfdcFanBoy's user avatar
  • 4,035
0 votes
1 answer
140 views

deserialize a JSON and modify a single attribute in the list of Object

I have a JSON string as below from a http response. { "agreements": [ { "agreementId": "ag0", "publishedDate": "04-03-2016 00:00:00", "AgreementNumber":...
Sisir's user avatar
  • 101
0 votes
1 answer
6k views

Parse child JSON object in JSON array

i am trying to parse a response which is a json object that has JSON array, what I need is to get value in the specific object from the array, inside "results" I'd like to get value from key "id" ...
Adnan Zahry's user avatar
1 vote
0 answers
260 views

How can I parse an "@odata.nextLink" to an apex class?

My json response from Azure includes an attribute that's "@odata.nextlink: [url]". In my parser class how can I get this url value? I can't declare it as something like Public String @odata.nextLink ...
Naomi Harmon's user avatar
1 vote
2 answers
116 views

Correct JSON Parsing without substringBetween

I'm using a bad practice in my code. I get all needed values from JSON like this: Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('Endpoint is here'); ...
MichaelLev19's user avatar
0 votes
2 answers
205 views

Email To Salesforce. Is there anyway to remove the replies of the email?

I have recently set up some email to salesforce functionality. However email to salesforce also logs all of the replies from the email, so after a few replies, the task contents become rather lengthy/...
Alexander Atkinsoon's user avatar
1 vote
1 answer
403 views

JSON DeSerialization Help?

I am currently working on an integration with other systems and I have the JSON coming back in the below format. { "searchDocumentsResponse": { "documentsIndexInfo": [ { ...
Rajesh's user avatar
  • 103
2 votes
1 answer
107 views

Can we analyze PMML models in Salesforce?

Is there any piece of Apex code or Managed Package that is able to read and parse PMML models, and then evaluate them on a given set of data? I cannot find anything directly, and hoped some of you ...
Willem Mulder's user avatar
1 vote
1 answer
800 views

How is JSONParser object structured / stored? [closed]

I am exploring the JSONParser methods and trying to understand how its objects are structured and stored in Salesforce database. Here is my JSON string - String input = '{"name":"paulo","age":42, "car"...
Manish Anand's user avatar
2 votes
1 answer
1k views

How to advoid Unknown field: MyJSON.number

I am having trouble with deserialising a jsonstring. In my debug I get the error System.JSONException: Unknown field: MyJSON.number. As number is a reserved field in salesforce I replace it with ...
Thomas's user avatar
  • 2,298
0 votes
1 answer
2k 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 ...
Olivia's user avatar
  • 3,391
0 votes
0 answers
52 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 ...
Monica Manickam's user avatar
0 votes
1 answer
1k 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 ...
SfdcBat's user avatar
  • 4,751
0 votes
0 answers
92 views

Parse a String as an Array using System.JSONParser [duplicate]

AN external system for some reason sends a node in a JSON as a String instead of an array like below: "vr_sch": "[{"type":"Record","tableName":"hpd","SId":"868","frequency":"ONCE"}]" The Apex class ...
SfdcBat's user avatar
  • 4,751
1 vote
2 answers
639 views

How to parse this JSON response returned in Einstein Chat-Bot?

Currently getting raw JSON response - { "coord": { "lon": 73.85, "lat": 18.52 }, "weather": [ { "id": 800, ...
user avatar
3 votes
1 answer
3k views

How to read JSON that contains field that can have different types

I am writing a callout in Apex with returns a JSON file with a field that does not have a consistent type. The JSON returned is quite complicated, so I have been trying to read the JSON with a Apex ...
Anthony Mealand's user avatar
1 vote
1 answer
107 views

How to convert Json string with adminbooster and call a value

I am newbie trying to find a wordflow which makes it easy to convert JSON strings to apex I used adminbooster but get for example public cls_0 0; public class cls_0 { public cls_0 0; throws an ...
Thomas's user avatar
  • 2,298
5 votes
3 answers
4k views

JSON Parser getCurrentToken()

I have a JSON string that I want to parse out. I have use the below code many times but for whatever reason this time it is not working. Can anyone poke any holes in this logic? Or point out why this ...
Olivia's user avatar
  • 3,391
6 votes
1 answer
3k views

What is recommended way to unit test JSON Parser based on JSON.deserializeUntyped calls?

We are doing a lot of JSON data parsing in our solution by own JSON parser implementation. I wonder how can I write unit tests for JSON parser. Is it good approach to load JSON data from static ...
Grzegorz Połuch's user avatar