Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [parsing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
139 views

SSJS script is timing out at 30 minutes. How to I build series of scripts using rownum to parse the DE sequentially?

We have an SSJS script that is calling an API to fetch price of items and writing it into a DE. The API call is taking time and in 30minutes the script is only able to retrieve the price for ~6000 ...
Anay Shrikar's user avatar
-1 votes
1 answer
28 views

Help With Parsing Wrapper Class For Xero Contact

I am trying to update a Xero contact with Payment Terms when a salesforce account is updated. I extracted the json for a contact using Postman and then used json2apex to generate the wrapper class. ...
DanP's user avatar
  • 21
0 votes
1 answer
94 views

Parse XML fails with NullPointerException when attribute is xlmns only

I got a sample XML like this: <?xml version="1.0" encoding="UTF-8"?> <RootNode> <Sample1 xmlns:key1="yyy"> <Sample11>ABC</Sample11&...
Poypoyan's user avatar
  • 151
0 votes
1 answer
47 views

Apec Class Issue when parsing a text string back to a record

I have a LWC that essentially collects data in a table format. I am then using an apex action (apex class) to parse the text string output of the LWC back to a record - see the code below: public ...
Matt's user avatar
  • 1
1 vote
0 answers
150 views

problems with adding Child node to existing XML elements

I am trying to parse html in apex class using XML Parser Document and XML Nodes classes. At one point I need to add another xml which is present as string with me to one of the nodes as child node in ...
PK SF's user avatar
  • 41
0 votes
1 answer
474 views

How can I retrieve particular data from json string using Apex? [closed]

When individuals fill out a survey through an outside source, the JSON data gets stored in Salesforce as a Long Text Area in a custom Survey__c object (about 25,000 characters). There are hundreds of ...
user avatar
0 votes
2 answers
2k views

How to parse JSON correctly using nested wrapper classes? [duplicate]

I'm trying to parse multiple invoices converted to nested JSON that is coming from the rest service. Here is how it looks like: { "files": [ { "bill_from": &...
user avatar
0 votes
2 answers
155 views

How do I insert a data extension variable immediately after an "="?

So within my email, I can call a data extension field: %%User_Type%% When previewed, this displays as either "Free" or "Premium" depending on the user. For data tracking via google ...
Joshua Vogel's user avatar
-2 votes
1 answer
279 views

JSON parsing object/array

I am trying to parse JSON but an error comes when the data comes in array format, I tried to typecast the untypedMap in Object and used instanceof to check if it is Map<String, Obejct> or List&...
Anzar's user avatar
  • 954
0 votes
0 answers
33 views

Working with a JSON array with inconsistent Type returned from a callout

I am making a callout and getting a JSON array in return. My initial thought was to use an Apex Wrapper class and deserialize. Because I need to do some transformations with the values and display ...
P.Shri's user avatar
  • 69
-3 votes
1 answer
74 views

Find text between @ and Space in a Message with Process Builder [closed]

I have text that is something like this: sample text @dave more sample text I need to just parse out and find "dave" To clarify, I just have not used LEFT, RIGHT and LEN much so I am ...
Troy's user avatar
  • 1
1 vote
1 answer
315 views

Can't parse JSON properly - access to inner list values

for two days, i am trying to figure out parsing of following json. [ { "name": "Czech Republic", "alpha2Code": "CZ", "...
MatejN's user avatar
  • 31
0 votes
1 answer
483 views

I'm getting wired error when trying to connect PDF.js to my LWC

I'm doing a little project - the idea is, I am given Invoice pdf file and I have to parse that to JSON so that I could insert invoice data into Opportunity and OpportunityLineItem. I'm using PDF.js ...
user avatar
0 votes
1 answer
132 views

Not able to get specified value from JSON

I am having JSON structure like this "line_items":[ { "id":385, "name":"AD737", "product_id":743, ...
klnavi's user avatar
  • 79
1 vote
1 answer
939 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
  • 105
0 votes
0 answers
363 views

Weather API callout issues

I am currently working on creating a prototype LWC that gives weather information for a given location. The location is being provided via user input. For some cities, it works fine - as in the case ...
William Mallady's user avatar
0 votes
1 answer
634 views

Help with storing JSON data [duplicate]

I'm new to salesforce and I have to parse this JSON and store the values in variables. I have used json2apex which generated 2 classes for me. When I use system.debug I can see it's reading the JSON ...
Lucas Angeli's user avatar
0 votes
1 answer
125 views

CDT time conversion to salesforce dateime field format

I have been stuck in a problem actually i am trying to covert a datetime format in salesforce date time field format The datetime format which i am getting is 2020-09-13 10:37 CDT I tried removing CDT ...
Sam-dev-sfdc's user avatar
0 votes
0 answers
185 views

Inserting bulk records from CSV on an object and capturing error rows

I am working on parsing CSV file to insert bulk records on an object (OBJECT 1)and populate two lookup fields(OBJECT 2 & OBJECT 3) on it. If the lookup records are already present in the database ...
Badduboy's user avatar
  • 111
1 vote
1 answer
1k views

How to respect non-self-closing br tags when apex parsing HTML with "Dom.Document" class

I'm trying to parse an HTML string. This string comes from a Salesforce rich text editor's content. It's a field saved on a record. String html = '<p>hello<br>goodbye</p>' String ...
Andy Ray's user avatar
  • 1,468
-2 votes
2 answers
2k views

Replace `"{"` to `{"` from String in Apex

Please hear me out before marking this as duplicate or irrelevant. I have done one integration and I am getting data something like this. { "page_number": 1, "page_size": 10, ...
Nupur Bhagat's user avatar
1 vote
1 answer
47 views

JSON Objects into string type

I have a doubt regarding the JSON deserialiser method. So when we deserialise a JSON response or JSON file. Is there a way to make every attribut and value into a string type rather than its original ...
Suel Ahmed's user avatar
1 vote
2 answers
1k views

How to parse inner child aray/object?

please do not close my case. I have submitted the same question couple of times yesterday, but someone has posted a link. Am sorry for that, am very new to this coding. But i managed to print all the ...
user84267's user avatar
0 votes
0 answers
2k views

Find/Replace JSON Keys with Apex

I'm stuck preparing a JSON body for a request. I am pretty new to JSON and don’t fully understand the parsing class syntax, but I conceptually understand what I’m trying to do. Overall Goal: My ...
David 's user avatar
  • 61
-1 votes
2 answers
58 views

Issue with parsing json

// // Generated by JSON2Apex http://json2apex.herokuapp.com/ // public class JSON2Apex { public class Status { public String self; public String description; public String iconUrl; ...
Varun Bhargav's user avatar
0 votes
1 answer
250 views

JSON Deserialize Error : Expected '[' at the beginning of List/Set

Im trying to deserialize a JSON to object. The JSON response looks like this : { "o_gpid": 2000000237, "o_bilreq": "BR-0000000371", "o_netrv": "3603000000", "o_ucogs": "3120900000", "o_ntgp2": "...
Arief Gunawan Tjiptorahardja's user avatar
2 votes
1 answer
5k views

org.auraframework.util.json.JsonStreamReader$JsonStreamParseException

everyone. I am currently working on a Salesforce practice chunk. I just copy/paste, but at the moment of saving my code, throws me the following error: ( // Load expenses from Salesforce ...
Emiliano Luzardo's user avatar
0 votes
0 answers
32 views

How to handle both a single item and an array for the same property [duplicate]

I have an incoming JSON payload that with the parameter device_config. This parameter might be, at times, sent as an array of strings or a string. How would I handle this parameter when its being sent ...
Richard's user avatar
  • 165
0 votes
1 answer
948 views

CSV file string parsing by newline error

I'm trying to write unit tests. The unit tests have input of a stringed csv file. So I'm having csvFileDataAsString as the simulated input. String csvFileDataAsString = 'Column1,Column2,Column3\...
user2751691's user avatar
0 votes
1 answer
2k views

How to provide default DateTime value in UTC time

I am providing a default value to a DateTime field in my apex class. customobject.DateTime__c = DateTime.parse('01/01/1990 12:00 AM'); I want to set the default value to 01/01/1990 12:00 am UTC ...
Student's user avatar
  • 565
1 vote
3 answers
21k views

Parse JSON with Apex

I am trying to deserialize below JSON . Problem is that sometimes message is returned as an object and sometimes as an array . In this JSON , I have combined three HTTP responses into one so as to ...
user66468's user avatar
0 votes
1 answer
156 views

String parse to Date yymmdd

I wrote a question below : String parse to Date yyyymmdd But now I'm facing a new similar question : What if I want to parse a string yymmdd to a date? for example : 190503 instead of 20190503. ...
Salvation's user avatar
  • 1,189
1 vote
1 answer
1k views

String parse to Date yyyymmdd

I need to parse a string that I got from a json to date while the value of the string is in the next format: yyyymmdd - for example 20190429. Is there another simple way to do it instead doing ...
Salvation's user avatar
  • 1,189
1 vote
1 answer
2k views

Explicitly parse JSON string vs JSON.deserialize

The JSON2Apex web tool offers 2 methods of parsing of the JSON string: one uses JSON.deserialize method, and the other creates parser and iterates over the input json. The second option can be enabled ...
Eduard's user avatar
  • 5,149
0 votes
2 answers
184 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 ...
user7484388's user avatar
0 votes
1 answer
2k views

Invalid conversion from runtime type ERROR

I'm trying to parse json response.. but keep getting this error Invalid conversion from runtime type List ANY> to Map String,ANY> Map<String, Object> MapLv3 = new Map<String, Object>()...
Arief Gunawan Tjiptorahardja's user avatar
0 votes
1 answer
543 views

Cant get the 1st row from JSON Parsing array

Im trying to get the participants data from API response.. //Level 1 Map<String, Object> MapLv1 = (Map<String, Object>) JSON.deserializeUntyped(parser); ...
Arief Gunawan Tjiptorahardja's user avatar
1 vote
1 answer
2k views

Parsing Using JSON2Apex

Im trying to use the JSON2Apex to get the parsing class for my API response.. I only need the metrics data for each userId, but I cant get the variable and the system always giving error Variable ...
Arief Gunawan Tjiptorahardja's user avatar
1 vote
1 answer
3k views

Method does not exist or incorrect signature: void parse(String) from the type or_propertyJSONTest

I am new to apex callouts and trying to do some JSON parsing. I used the online tool https://www.adminbooster.com/tool/json2apex which worked great. I got a class and a testclass from the ...
Thomas's user avatar
  • 2,298
0 votes
2 answers
465 views

Help Parsing JSON Body

Im trying to get the Id and Name from JSON Body that I requested, and put the value into custom object { "id": "ab24ddb8-f1ef-4cca-ae72-9f20f5975332", <-- THIS "name": "App Dev Account", <-- ...
Arief Gunawan Tjiptorahardja's user avatar
3 votes
1 answer
12k views

Best way of generating a random number

In order to get fake IDs for testing needs I wrote something that works and is reusable, but I'd like to know if there is better ways because my code seems heavy. n is the total caracters of the ...
Alexis MASSON's user avatar
0 votes
1 answer
7k views

System.JSONException: Unexpected character ('1' (code 49)): was expecting comma to separate OBJECT entries

"sourceMessage": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><error code=\"VALIDATION_FAILED\"> <failure cause=\"INVALID_VALUE\" field=\"Status\" value=\"NotDefined\...
Rakesh Kumar's user avatar
0 votes
1 answer
502 views

Is there a limitation of date value while parsing in apex

There seems to be some parsing limitation on string dates in apex. When I am doing the following it throws a system exception saying invalid date: String s = '12/31/5000'; Date.parse(s); However ...
starhunter's user avatar
-1 votes
1 answer
101 views

How do i deserailize this json string

Can Any one help me in deserializing this json string: "(ActivityHistory:{AccountId=0011a00000qWdtzAAC, Id=00T1a00001m4m99EAA, WhoId=0031a00000u3iXlAAI, Subject=Call, Status=Completed, Priority=...
Vee_force's user avatar
0 votes
2 answers
6k views

Handle Extra "\r\n" new line in CSV from code level

I'm using the following code to Parse CSV file in Apex: public static List<List<String>> parseCSV(String contents,Boolean skipHeaders) { List<List<String>> allFields = new ...
lemdev's user avatar
  • 427
1 vote
3 answers
517 views

How to parse a hal+JSON response that has a invalid node name

In general I know how to create a apex class to parse the JSON response in salesforce. But with the current system I am integrating has a weird node name format and i having issues with creating apex ...
user51395's user avatar
0 votes
0 answers
81 views

Parsing ERROR Ending position out of bounds: 255

Need some help with parsing csv thru apex . Below are the records i am trying to pass in csv but i am seeing an error : Ending position out of bounds: 255 1,,,"ABC,DEF",,"Robert, Thoma; (CFD)", ,Me ...
Natasha's user avatar
  • 127
1 vote
2 answers
479 views

Convert HTTP Response date to Apex Datetime

I have an HttpResponse object with the Date as a header property. Its format looks like this: Thu, 13 Jul 2017 06:59:43 GMT and I would like to parse it as an Apex Datetime object. I did multiple ...
Simonp's user avatar
  • 1,892
1 vote
0 answers
249 views

Taking the email body information from an Email-To-Case

We are currently using Email to Case for one of our customers and they send us in their data straight out of their system i am guessing using a template, They have the data in the same format and i ...
Matthew Bracewell's user avatar
1 vote
1 answer
641 views

Deserialising JSON with a '.' variable

I am attempting to deserialise a JSON response with some variables that Salesforce is having a problem handling because there is a '.' in the object name (as well as a '.' in some variable names). ...
Kamil Mieczakowski's user avatar