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 [parsing]

The tag has no usage guidance.

0
votes
2answers
50 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 ...
0
votes
1answer
36 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. ...
0
votes
1answer
45 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 ...
1
vote
1answer
452 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 ...
0
votes
2answers
29 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 ...
0
votes
0answers
33 views

How to parse JSON String through apex [duplicate]

I want to get 'guid' and 'attachednotes'The attachedNodes is in different format. I think it is string array, but I am getting an error. { "messageHeader": { "triggeredBy": "manual", "...
0
votes
1answer
134 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>()...
0
votes
1answer
21 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); ...
1
vote
1answer
263 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 ...
1
vote
1answer
352 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 ...
0
votes
2answers
102 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", <-- ...
0
votes
1answer
2k 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 ...
0
votes
1answer
467 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\...
0
votes
1answer
131 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 ...
-1
votes
1answer
65 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=...
0
votes
2answers
437 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 ...
0
votes
3answers
119 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 ...
0
votes
0answers
30 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 ...
1
vote
2answers
150 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 ...
1
vote
0answers
60 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 ...
1
vote
1answer
192 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). ...
1
vote
0answers
167 views

Parsing Google Sheets JSON response

I am working on a project where I need to access values in a Google Sheet, scan them for certain keywords, and if they meet a particular condition, copy the data from a given row into an object in ...
0
votes
0answers
178 views

Selectively Parsing a JSON file

I am attempting to parse MatterMark's API, but I am planning to do so selectively, picking only the value pairs that are relevant. The example JSON response is available to be viewed in MatterMark's ...
4
votes
1answer
405 views

Pass Case Ids collection to visual workflow from Case List View Custom Button and update cases taking from input screen

Requirement From Case list View, user will choose one or more cases and will click on "Update Due Date" button, where it will show a screen to choose the "Due Date". Due Date screen And finally ...
1
vote
0answers
30 views

Apex Generation Failed (WSDL parsing error) [duplicate]

I'm trying to parse a simple Webservice and I'm receiving this error: Apex Generation Failed: Unable to find complexType for {http://soap.***}RelationshipReferenceTo There are two lines in ...
2
votes
1answer
428 views

WSDL error in parsing process

I have been trying to parse a WDSL file in FuseIt and also in SFDC, but I get an error that it is not allowing me to generate the apex classes I need. This the error I get in SFDC: Apex ...
2
votes
2answers
58 views

Strategy On Restructuring SOQL Query

I hope someone can lend some advice on how to go about this issue. I believe it to be more of a strategy question. After my code as been written and tested, we found a new field that was needed to ...
1
vote
2answers
127 views

Test Error: JSON2Apex method does not exist

Error: Method does not exist or incorrect signature: JSON2Apex.parse(String) I used https://json2apex.herokuapp.com/. I got back APEX and a test class that should work. I am getting the above ...
2
votes
1answer
2k views

What is wrong with this query? (Unknown error parsing query)

When I run the following query in query editor I get this error. Error Unknown error parsing query Query SELECT Id, OwnerId,Account.OwnerId FROM Contact where OwnerId = Account.OwnerId limit 100 ...
0
votes
2answers
722 views

REST JSON response to VF page

I'm trying to parse the json string into meaningful data over a VF page. Here's where I'm stuck... public class callApi{ private final String serviceEndpoint= 'http://XXX'; public String Response {...
3
votes
2answers
765 views

Map one xml to List of SObject?

I am quite new in Xml parsing. i am having a XMl <company> <account> <id>8c98a6be</id> <label>4356</label> <reference>4356</reference> </...
6
votes
2answers
98 views

Corpus Analysis for Salesforce?

I am asking this question here instead of Stack Overflow because I believe it has relevance to other Salesforce developers. If I am mistaken and this post starts racking up close votes, I will move it ...
2
votes
1answer
2k views

Illegal Value for primitive when trying to parse the json data

I am facing the issue like "Illegal Value for primitive" when trying to parse the json data.Below is the Json Response which i get from a service. [{"revenue": {}, "emails": [{"grade": "A+", "type": "...