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

The tag has no usage guidance.

1
vote
1answer
87 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": [ { ...
2
votes
1answer
25 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 ...
1
vote
1answer
44 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"...
2
votes
1answer
34 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 ...
0
votes
1answer
216 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
38 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
1answer
93 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
0answers
43 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 ...
2
votes
2answers
116 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, "main": "Clear", "description": "clear ...
3
votes
1answer
264 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 ...
1
vote
1answer
45 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 ...
5
votes
3answers
508 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 ...
0
votes
0answers
15 views

dynamic JSON values [duplicate]

Any idea how to parse a dynamic JSON. The metadata in json can or cannot contain value. Value are dynamic. Metadata name are be different with value. Some it can have 2 or 1 metadata. So to create ...
5
votes
1answer
814 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 ...
1
vote
1answer
142 views

Convert Json to apex by adminbooster class and testclass

How do I use the json2apex tool. I generated an apex code and I am trying to split this in an apex class and testclass but get the error: Method does not exist or incorrect signature: void parse(...
3
votes
1answer
244 views

Callout exception Illegal value for primitive

I can't work out why I'm getting this error. Ultimately, I'm just trying to send a list of SingleEmailMessage via callout, but that's not a valid type for the post method nor can it be directly ...
0
votes
1answer
22 views

Substring based on a word and immediate next third bracket

I have a large text value as below in a custom field of a custom object. FINDDATA: [XY_8852376....... {name:"State__SKN", "data": "State__SKN", defaultContent: '', className:"frozencolumnscolor", ...
-2
votes
2answers
2k views

Apex - How to parse json response to a map

I am getting a json response from an API call. System.debug('result is : ' + responseToken.getBody()) //This response.body format is as below: { "email":"are02@gmail.com", "LastName":"ABCD", "...
0
votes
0answers
66 views

Apex SOQL/SOSL Parser

Is there an Apex-based DML, SOQL and SOSL parser? I see the only way this could happen is during the time of deployment, I can use DeployDetails to get the list of SOQLs. Any pointers on how I can ...
1
vote
1answer
390 views

How to generate generic Apex Code from WSDL?

Is there any process where we can generate apex code whenever the WSDL changes such that changes in the WSDL can be added/updated to the Apex class/classes in a generic way such that we do not have to ...
3
votes
1answer
81 views

Compile Asset Model

I'm trying to compile the asset model using the reference from this page : https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/compiling-asset-model.htm I'm trying to ...
1
vote
2answers
2k views

Convert JSON String to a list<Class>

How do i parse a JSON String to a list. Here, I have a class named LatestStatus and it has its variables. I need to expose these variable as table in lightning component. JSON String : { "...
0
votes
1answer
876 views

how to parse XML file having nested tags using XmlStreamReader?

my xml string is below - <articles> <article> <source>EN-US</source> <target>SL</target> <id>ka1800000000eCYAAY</id> <publishstatus&...
1
vote
2answers
745 views

Returning a value from JSON Object

Hi I am trying to return a second value pair (string) from a JSON object using APEX's own built-in parser. The API query takes a string variable of a web domain. However, I am getting a strange ...
4
votes
2answers
4k views

Json deserialize with wrapper class

I have created a wrapper class , below is the class public class Wrapperclass { public String pictureUrl {get;set;} public String publicProfileUrl {get;set;} public class basicdetails{ ...
1
vote
2answers
1k views

DateTime conversion to time zone

I want to save event in picked timezone. So the cese is: If user location Moscow, he want to create meeting in London, he checks picklist London. And the event must be saved in London time. For ...
3
votes
1answer
937 views

Unexpected character ('}' during JSON desearilization

I get a JSON response from external system in the resposne.body() The JSON looks like this: "[{\"workOrderNumber\":\"WO-02612\",\"workOrderId\":\"a3F5C000000LHB0UAO\",\"processingStatus\":\"Open\"}]...
0
votes
2answers
2k views

Form JSON structure and add values of all child record of a parent object

I have to populate the values in a JSON structure. The values are obtained from the fields of a parent object and also the child object. I may have more than 1 child records of a parent object. how ...
0
votes
1answer
963 views

Generating a JSON using apex

I looking at the code on how to generate a JSON structure like below: 1. { "element1": "123123", "element2": "test", "element3": [{ "element3.1": " ", ...
2
votes
1answer
3k views

System.JSONException: Unexpected character ('}' (code 125))

I am passing the below JSON structure using POST method to a apex service: I get an error at line where the codes variable ends { "PId" : "345", "Description" : "test", "Codes" :[ { "Code" : ...
0
votes
1answer
348 views

JSON parser is returning nullValue

I'm trying to parse JSON to extract a Zip Code from a JSON response. Instead of returning "10019-6018", the parser is returning "null10019-6019". Why is it inserting "null" in front of the value? ...
0
votes
1answer
501 views

Json Parsing Issue

I am trying to parse json response as follows: ["India",["India","India\u2013United States Civil Nuclear Agreement","Indian rupee"],["India, Test"],["https://en.wikipedia.org/wiki/India","https://en....
0
votes
4answers
130 views

Tool to read Apex code and note variances against coding style guide

We have some guideline for writing code and follow coding standard from java. For example : List<String> listVar = new List<String>(); In the above 'List' L should be caps. 'String' S ...
2
votes
1answer
663 views

Parsing JSON and Pulling Information To VisualForce Page

I am having difficulty understanding how to take a parsed JSON list and saving it into an APEX list. My end goal is to have the Username and associated PriorityNumber listed out on a VF page. I have ...
4
votes
2answers
3k views

How to parse XML data to JSON? How to deserialize XML to Apex class?

I Have Xml data as Follows String Data_XML = '<?xml version="1.0" encoding=""?> <book><price>100</price><Items>2</Items> </book>'; I wanted to deserialize ...
1
vote
0answers
232 views

RemoteAction: problem returning Map<object, sObject>

I am trying to return a map of object to sobject. However I get a parsing error: VFRemote.js:117 Visualforce Remoting Exception: Error parsing json response: 'Unexpected token {'. Logged ...
5
votes
0answers
747 views

JSON parsing to Visualforce page difficulties

Following my previous question here I've been dealing with some pretty crappy JSON for an assessment submission and trying to display it in a VF page as a table, ultimately with questions, available ...
0
votes
1answer
2k views

How to create a new record from a CSV file attachment processed by the email service in salesforce

My requirement is that I need to create new records / update existing records based on the data from an email attachment consisting of .csv file format that is parsed to the Email Service that I've ...
0
votes
3answers
3k 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 ...
2
votes
0answers
402 views

Get first row of CSV data in salesforce and use for mapping

I want to get data from csv and upload it to salesforce. I use this link http://www.blueengine.com.au/?p=40#comment-271 and http://developer.financialforce.com/customizations/importing-large-csv-...
4
votes
1answer
2k views

Reading a pdf file in apex controller

I am trying to read a pdf file that is stored in Static resources.The body of the pdf comes in a Blob format, but I am not able to get the blob back to the readable format.How do I accomplish it.
4
votes
2answers
378 views

Parse apex class using another class

I want to create something like a Java doc but for apex. So it would parse through classes, pages, components, etc and pull out things like soql and sosl statements, classes it relies upon, objects it ...
1
vote
0answers
375 views

Apex DOM get children at nth level

I have got the XML of the following format: <parNode> <parNode2> <parNode3> <parNode4 name="name1"> <flags attrVal="1" /> ...
6
votes
3answers
6k views

Why does the SOQL parser give a primitive message like 'Unknown error parsing query'?

If you make a mistake/typo in a SOQL query in the Developer Console, you frequently get the - not helpful - message "Unknown error parsing query". I started programming in the early 80s, in BASIC of ...
12
votes
1answer
7k views

System.JSONException: Apex Type unsupported in JSON: Object

I was trying to parse json to apex but i was getting System.JSONException: Apex Type unsupported in JSON: Object My apex code was public class patdetils77 { //public String strBody{ get; ...
4
votes
1answer
558 views

Using ExactTarget's FuelSDK, how do I parse the response object?

I'm able to successfully retrieve results using Exact Target's Python FuelSDK, but can't figure out the format of the response.results object or how to parse it. It looks like JSON... but not quite. ...
1
vote
1answer
500 views

FuseIT WSDL Parser -

I am trying to parse a wsdl (this one) using the FuseIT SFDC Explorer tool, as the wsdl has some xsd imports. I am getting an error that I dont understand, not sure if it is wsdl related or parser ...
2
votes
1answer
2k views

How to parse response with XMLStreamReader or DOM?

I am getting the below response from a webservice call <response> <status>sucecss</status> <Message>xyz..........</Message> </response> I have trying to prase ...
1
vote
1answer
522 views

Parse WSDL file using Apex code [closed]

I want to parse WSDL file in apex manually. Is there any API or can anyone please share code snippet for parsing WSDL in apex class.