My goal is to store user preferences (maximum 2-3 users) in a cookie for easy access. Upon login, I first check if the 'users' cookie exists. If not, I create it. If it does exist, I check if the current user is included in the cookie. If not, I ...
Need help with parsing a JSON string using JavaScript. The response looks like this: var data = '{"success":true,"number":2}'; Is there a way to extract the values success and number from this? ...
Can someone assist me with parsing and navigating through JSON results using PHP? In the example below, I need to specifically target technology categories. What I want to achieve is to identify if the category 'analytics' exists in the result, set a true ...
After retrieving a JSON file and utilizing NodeJS to parse it, the structure of the JSON file appears as follows: { "id": 5, "x": 9.996, "y": 0.135, "v": { "x1": 0.653, "y1": -0.064 }, "z": 1.4730991609821347 }, { ...
Having a JSON log file with a JSON delimiter (/n), I am looking to convert it into Spark struct type. However, the first field name in every JSON varies within my text file. Is there a way to achieve this? val elementSchema = new StructType() .add("n ...
I recently received an email that was sent to multiple addresses on the same server. The server is set up for 'catch all'. However, when I check the header (imap_headerinfo) or overview (imap_fetch_overview), I can only see one 'to address' listed. The 't ...
As a novice, I am venturing into the world of using JSON with VBA. My goal is to import data from an external source into Excel and then apply some VBA magic. The JSON format might seem complex at first glance, so I'm curious if there's a way to include c ...
Could you please provide insight on how to extract data from a varchar type in both Presto and Hive? [{u'pageId': u'102', u'title': u'ud648', u'isBrandHomePage': 1, u'active': True, u'pageTyp ...
I am currently using EJS as the templating engine for my Express application, but I'm facing some challenges with passing a variable from the server to the client script. Despite trying methods like JSON.stringify and JSON.parse mentioned in similar ...
I am having an issue with a JSON file in which there are strings of characters attached to many of the field names. This is making it difficult for me to target those objects in JS. The structure looks like this: "bk:ParentField": { "bk:Field": "Va ...
When I'm using the request library to parse data, it returns a list of JSON data. However, when I try to find the length of the response list, I encounter an error that states TypeError: object of type 'Response' has no len(). Here is the code snippet I am ...
As I attempt to retrieve a value from a deeply nested Json object, I encounter a Parse error: The Json data I'm working with: { "MessageId": "f6774927-37cf-4608-b985-14a7d86a38f9", "Time": "2017-04-06T16:28:38.07 ...
I have successfully created a listview in my app and parsed JSON data into it, including images and text. Now I am facing an issue where I need to pass the image to another activity when the user clicks on it. I can easily pass text data using putExtra, bu ...
Having a custom section in my package.json file is something I'm currently working with. Here's an example structure: { "name": "foo", "version": "0.0.1", "dependencies": { ... }, "mySection": { ... } } Retrieving the data from this custom sectio ...
While I have a strong grasp of R, I am relatively new to JSON file formats and the best practices for parsing them. My current challenge lies in constructing a data frame from a raw JSON file that contains repeated measure data with multiple observations p ...
Can anyone help me create a HTTP link using information from a database, such as IP and port number? I have tried the following code but keep encountering an error while parsing. Any assistance will be greatly appreciated. @app.route('/link_test/<str ...
Is there a way to extract information from cURL posts using PHP? I have a PHP client that utilizes this cURL request: data1 = array( "email" => $email, "firstname" => $firstname, "lastname" => $lastname, "code" => $code ); $da ...
I have a String variable with data that I would like to convert into a data frame using Python. I need someone to provide guidance on how to proceed. Data : data1 Name Space -------------------- ...
I am looking to extract the first element starting after [{ using the code provided below. [ { "Bkav": { "category": "harmless", "result": "clean", "method": "blacklis ...
I recently explored a few Node.js modules and came across netscape-bookmarks for managing bookmarks. Now, I'm looking to read the bookmark.html file that I have either created or imported from my Chrome browser. I attempted to use the 'npm-bookmark-parse ...
Recently, I embarked on my journey into Backend development. For the past few days, I've been tirelessly attempting to retrieve a response from an API and display it on my HTML page. However, I keep encountering a persistent error while trying to pars ...
Need assistance with parsing a JSON-formatted string obtained from a URL. The field and size of the data may vary, making it difficult to iterate over the structure of the JSON object. Here is an example of the string: {"_index":"my_index","_type":"my_t ...
Having trouble removing a specific key and value pair from a JSON string in Java. I've tried using regex but can't seem to get it right. Can someone help me figure out what I'm missing? "appointment_request_id": "77bl5ii169daj ...
I am relatively new to using optimist and despite my attempts at researching and experimenting, I have been unable to find a streamlined method for incorporating a --help option. In the documentation, there is mention of a help() function. Based on this i ...
for num in range(0,len(input_user)): if input_user[num] == ('-'): if (input_user[num - 1].isalpha() and input_user[num + 1].isalpha()): goal += input_user[num] else: ...
Looking for some assistance. I'm grappling with parsing the JSON output provided by the cloudstack API in vb.net and feeling a bit stuck. The JSON response from the cloudstack looks like this: { "listcapacityresponse": { "count": 6, ...
I'm currently using the code provided in this helpful resource for parsing my JSON: Although it successfully handles most of the JSON data I have, it encounters issues when a JSON object is directly nested as a child within another one. To illustrate the ...
When parsing a text, each word is turned into a link. The issue arises when punctuation marks are not included within the <a> tags. I am unsure of how to handle this and include the punctuation marks as well. <table> <tbody> <tr& ...
Currently, I am in the process of creating a website for my video game servers. The admin tool we use outputs the current server status in a .json format as a large text string to this specific URL: My goal is to retrieve the entire text string from the p ...
Question Summary Is it advisable to develop a class for storing information parsed from JSON text with QT C++? Are there better alternatives? NOTE! I'm limited to posting only two links due to being new, but if more information is needed to answer the q ...
In Python, I am working with an object type that contains multiple entries in the data-object. An example entry is shown below: > G1 \ jobname x [3. ...
I am encountering a parse error when trying to send a JSON object. {"readyState":4,"responseText":"","status":200,"statusText":"OK"} Here is the code snippet: var data = { fb_id: response.id, email: response.email, name: response.name, first_nam ...
In my current situation, I am facing a challenge in extracting the values from the given HTML text and storing them in separate variables. I have experimented with Cheerio library, but unfortunately, it did not yield the desired results. The provided HTML ...
I am trying to extract only the text inside the <a> tags from the first <td> element of each <tr>. I have provided examples of the necessary text as "yyy" and examples of unnecessary text as "zzz". <table> <tbody> <tr ...
Looking for assistance with extracting a part of a txt.file, specifically: #some comments #some comments #some comments # Predicted genes for sequence number 1 on both strands # start gene g1 scaffold_0 AUGUSTUS gene 1268 6647 0.19 - . ...
Is it possible to use a curl command that provides a JSON response in Java and parse the JSON response using Java? Here is an example of Java code attempting to achieve this: public static void main(String[] args) throws Throwable { try { In ...
While working with a BufferedReader and HttpUrlConnection to read a file from this URL: https://www.reddit.com/r/tech/top.json?limit=100, I've encountered an issue. Even though my code is able to read some of the file, it only captures about 1/10th of its ...
Objective: const jsonData = JSON.parse(this.description) ? JSON.parse(this.description) : null When executing the above statement, my aim is to have the ability to parse a value successfully and return null if parsing fails. However, instead of achieving ...
Currently, I am in the process of building a JSON parser for .NET that is effectively parsing JSON objects. However, I have hit a roadblock when it comes to parsing complex strings. For instance: The parser is able to successfully parse \"Hi there!&b ...
I have been attempting to reindex an index using a Python function like this: resp = client.reindex( body={ "source": { "remote": {"host": "url_name:9200","username": &qu ...
I have encountered an issue while trying to parse a specific json format on android. The json structure is as follows: {"header": { "param": "param" }, "body": { "param": "1", "param2": "2", "param3": [ ...
I am facing a challenge with my class: public void results{ @SerializedName("object1") @Expose private Object1 object1; @SerializedName("object2") @Expose private Object2 object2; @SerializedName("object3") @Expose private Object3 object3; @Serialized ...
Could someone please explain the distinction between JSON and GSON to me? I keep coming across the term GSON while researching JSON, but I'm not sure how they differ. I'm confused about the specific differences between the two. Additionally, I've encount ...
I have exhausted all possible methods to retrieve the data, but I am unable to solve this puzzle. The information is organized in a format like the following: [{"code":1000,"day":"Sunny","night":"Clear","icon":113,"languages": [{"lang_name":"Arabic","lan ...
Working on a fun little web app for my significant other and me to keep track of movies we want to watch together. I'm exploring using TheMovieDatabase.org's API (which only supports JSON) to simplify the process of adding movies to our list. The ...
Currently, I'm attempting to retrieve article headlines from the NY Times website. Upon inspection, it appears that the HTML is being generated by Javascript since it's only visible when using the 'inspect element' feature in Firefox. Is there a way for ...
Currently, I am immersed in a CNC project and aiming to convert DXF files into objects using JS. Initially, I attempted using SVGs but the results were not as expected - instead of shapes, the drawings exported as lines (e.g., a square appearing as four se ...
Seeking assistance with parsing data from a website. The JSON request runs successfully in the command line but encounters issues when attempting to execute it on Android: The request: "curl '' -H 'Host: billetterie.ctm.ma' -H &apo ...
Here's an interesting concept: allowing users to define a set of CSS rules with annotations. For example: /* @name Page style */ body { font: 16px/1.5 Arial; /* @editable */ background-color: #fff; /* @editable */ } /* @name Section header */ ...
After completing the input, the app crashes without executing any further actions. I have modified the code to display only the UPC and Product information instead of the entire section. Any suggestions on how to fix this issue? If there is a similar que ...
I'm feeling puzzled as this code seems to work inconsistently. It utilizes the beautiful soup module and I'm curious why it functions in certain situations but fails at other times. from bs4 import BeautifulSoup import requests import lxml import ...
Within my JSONObject (not an array, which I am open to converting), I am attempting to achieve two objectives: Determine the count of genre entries labeled as "poetry" (count = 2). Retrieve the key value pairs for author name and genre: authorName ...
I have a table that looks like this: https://i.stack.imgur.com/pSpmD.png Currently, I am using xlsx sheet_to_json to parse the data from the table. The resulting output is as follows: [ {id: "123", title: "John", __Empty: "Key", __Empty_1: "GA"}, ...
I am looking to extract information from an HTML file that contains elements with the class name "link". My challenge is to read each line into a variable and then parse it, all while using triple quotation marks. How can I create a string variable that ad ...
This JSON data is the server's response to my request, but I'm struggling to extract and parse the values correctly. {"items": [{"item": { "id":824, "company_id":31, "config_id":45, "imagesmall":null, "im ...
My inquiry revolves around a specific process. I am tasked with locating an element on a webpage using its class, extracting and displaying its text, then splitting it into parts using the split() function. However, I encounter an error when the specified ...
I'm currently facing an issue with a table in my database where the field JSONDetail stores JSON data. The problem arose when we encountered unescaped double quotes within one of the values in this field, likely due to migrating from a system that allowed ...
Greetings! I have a section of JSON data that requires parsing, and I have condensed it for better visibility. [ { "trends": [ { "name": "#CyberMonday", "url": "https://twitter.com" }, { "name": "#Bl ...
As a beginner programmer, I am currently working on developing an application using Json. In order to accomplish this, I have created a Json parser class and incorporated the following code into my main activity: JSONObject json = ...
Here's the JSON data that needs to be parsed: {"jsonrpc":"2.0","method":"subscription","params":{"channel":"book.BTC-PERPETUAL.raw","data":{"type":"change", ...
In an HTML table, the data is structured as follows: Header 1 has Row 1, Header 2 has Row 2 and Row 3, while Header 3 has Row 4, Row 5, and Row 6. <table> <thead> <tr> <th>Header 1</th> </tr> </thead& ...
Currently, I am in the process of developing a web application that enables users to upload data in JSON format. The method I am using to read local JSON files is as follows: function loadJSON(url, callback) { // set MIME type to avoid XML parsing in Fi ...
<script> $(document).ready(function(){ const xmlData = "<root> <method name='A'> <childcall name='B'></childcall> <childcall ...
I've got an input JSON that has the following structure: > {"payment": {"payment_id": "AA340", "payment_amt": "20", "chk_nr": "321749", "clm_list": {"dtl": [{"clm_id": "1A2345", "name": "John", adj:{"adj_id":"W123","adj_cd":"45"}}, {"clm_id": "9999", " ...
Given a large JSON file with 30 million entries like the following: {"id":3,"price":"231","type":"Y","location":"NY"} {"id":4,"price":"321","type" ...
Working with Jupyter Notebook and handling a Batch API call that returns a JSON array of objects can be tricky. The parsing process involves using for loops, which may seem weird at first. In my case, I needed to extract specific JSON object information an ...
Currently, I am reviewing the documentation for the nodejs readline module in order to tackle a task that involves reading a very large file line by line. The solution using readline seems promising, although I require it to read lines synchronously - mean ...
I am currently learning about Jquery, Ajax, and JSON but I am having difficulty with parsing Json data. Despite researching extensively on stackoverflow Parsing JSON objects for HTML table Access / process (nested) objects, arrays or JSON Parse JSON in ...
I'm running into an issue where I need to fetch JSON data from a website and parse it before displaying it in an iOS view. Take a look at my code; func initiateConnection(){ let urlPath: String = "http://examplewebsite.com/somejson/" var ...
I have successfully retrieved output from a phantom.js request via the command line and it meets my expectations. Now, I am interested in invoking phantom.js from a php script and then analyzing the output for specific content. My phantom.js script appear ...
In the project I am currently working on, the previous developers took an interesting approach by constructing all the selectors based on individual properties. For instance: .panel .selected a, a.selected-thumb, .date-picker input[type="submit"], .headi ...
I am currently conducting research for my graduate program in finance on the topic of crypto currencies such as bitcoin. I am focusing on extracting individual data from JSON responses provided by the cryptsy API, which is a platform for trading crypto cur ...
I am encountering an issue while attempting to parse JSON data with a Java POJO class. Below is the JSON and POJO structure: JSON: { "startDate": "2018-09-18T12:00:00+0000", "endDate": "2018-09-18T14:00:00+0000", "startDateAsDate": 153 ...
Recently, I developed a basic PHP script that fetches data from a local JSON file and uses it to respond to various queries directed at the page. In my implementation, I adopted the usage of file_get_contents() for reading the file. However, as the number ...
Here is the JSON string I have: [ { "channel": "/bvmt/initValues", "data": { "value": { "instrumentIds": "['TN0007250012','TN0007500010']", "instruments": "[{'mnemonic':'ADWYA','marche':'ADWYA','phaut':5.82,'open':5.82,'nb ...