Questions tagged [json]
JSON (JavaScript Object Notation) is a textual data storage and interchange format.
165
questions
0
votes
1
answer
64
views
Extremely slow json.load of a network response in WSL
Decoding a json response takes a lot of time on my system - Precision 5520 (11th gen I7, 64 GB) with Linux 20.04 LTS under WSL2 under Windows 10 Pro. Here is the relevant part of the code:
def ms_now()...
1
vote
0
answers
43
views
Why is cURL returning just two square brackets with this request?
This curl request returns empty square brackets []:
curl "https://www.bathnes.gov.uk/NodeAPI/geoDataLookup/getGeoJSON/-2.8530120849609375/51.263633525637/-2.126541137695313/51.456574106519724/11&...
0
votes
0
answers
17
views
How to create a static website from MBOX file
I have a large MBOX file (16000 emails) from a public email group which is now closed. For archival and research purposes, I would like to serve these emails on a website. How can I go about ...
0
votes
0
answers
17
views
Quickest way to add variable text from a text file to a JSON file in specific places
I'm trying to find the easiest and quickest way to fetch a list of names in different lines from a text file and appending them to a specific field in a structured JSON file that repeats itself over ...
4
votes
0
answers
316
views
Can you filter JSON with multiple keys in Firefox?
Can you filter based on multiple keys in the Firefox JSON viewer? Lets say I have the following JSON:
{
"obj": [{
"online": true,
"count": 5,
...
1
vote
2
answers
65
views
Multiply numerical value after a string in a json file by 3?
I'm trying to replace a number in a set of text files. The number will be different for each file, but it will always occur after a specific string.
Here's the original file:
"structures&...
1
vote
0
answers
164
views
How can I do basic validation of JSON in an Excel cell?
I have an Excel sheet that has a column that consists entirely of JSON values.
For example, cell A1:
{
"selected_pet": "dog",
"other_pets": [
"cat",
...
1
vote
1
answer
87
views
Failure to convert JSON to CSV file
I need to extract a particular anti-virus product scan results from a JSON file and list the elements in csv format for further processing. JSON file sample as below:
Contents of a file scanresults....
0
votes
0
answers
249
views
How to convert JSON to CSV in batch command line with jq utility
I need to extract a particular anti-virus product scan results from a JSON file and list the elements in csv format for further processing. JSON file sample like:
Contents of a file scanresults.json
{...
1
vote
1
answer
1k
views
How can import this JSON with nested objects to Excel using Power Query?
I need to import a JSON file into Excel in table format. The JSON file has nested objects that I need to display as the column data. I've watched several videos, read the docs and forums and cannot ...
-1
votes
1
answer
32
views
Finding Documents on CouchDB 3.1 with PowerShell
I need to query our couchdb tennant database using PowerShell. I've put together the following after trawling through different forums, help documents etc.
$password = ConvertTo-SecureString '...
0
votes
0
answers
36
views
How can one view the entire string of a JSON file in HugeJsonViewer?
I use HugeJsonViewer to browse the JSON file. How can one view the entire string of a JSON file in HugeJsonViewer? I can only see the beginning:
2
votes
1
answer
3k
views
How to import JSON data into EXCEL columns?
I have an excel spreadsheet like following:
with a first column the name of something, and then two columns "date" and "owner". I also have the following JSON file which I want to ...
1
vote
1
answer
566
views
Ansible Json Query
I got an dictionary output as below from one of the Ansible Task
"
msg": {
"vSwitch0": {
"failback": true,
"failover_active": [
...
0
votes
0
answers
87
views
postman console log only the response that contains an error
I'm not sure if this is the right place to post this.. I connected postman to my zendesk environment and I'm able to get the job status queue via the api/v2/job_statuses api that returns a list of all ...
0
votes
1
answer
76
views
Musescore 4.0.1, A batch job issue with .mid file conversion to .wav files
Issue & Scope of the problem
I followed the instructions here to preform a batch operation with Musescore Version 4 on Windows 11 CMD. Used a .json file just like in the highlighted example (below)...
0
votes
1
answer
724
views
How can I get a tree view for large JSON files in PyCharm?
When I open a small JSON file in PyCharm, I can easily collapse or expand its sections (note the medal-shaped symbols on the left):
However, when I open a large JSON file, this isn't possible anymore ...
0
votes
1
answer
2k
views
Extract element from JSON array in file with jq
I have the following JSON file list.json :
[
{
"$type": "Profile",
"ReferenceId": "6e374d9e-5bbe-4015-acd7-ae6f04de0db5",
"Name": " ...
0
votes
0
answers
148
views
Running CuraEngine from command line, returns empty GCode file
I have been attempting to get CuraEngine running from the command line in order to use an interactive python script with it through the subprocess import that python has. I call the directory that ...
0
votes
1
answer
537
views
regex to capture any http:// or http// links in JSON - Java 8 format
I have some URLs like this
https://mega.nz/sometest
http://depositfiles.com/files/sometest
https://www.mediafire.com/file/aaaaaaaa/bbrtbrbrb_%iiiiiiii_.zip/file
I usually use
(https?://mega\.nz[^>]...
0
votes
1
answer
679
views
Regex to extract specific text from nested html tags
I have this text
<div id="navbar"><a href="../index.php">Final Fantasy Shrine Forums</a> > <a href="./f-90.html">Downloads</a> &...
1
vote
1
answer
374
views
Merge multiple Slack JSON files
I have recently exported a very large Slack backup which consists of daily JSON files for each channel within the server. I have a process to manually transfer this information across to Discord but ...
0
votes
2
answers
2k
views
Convert text file to json file using batch script
@echo off
setlocal EnableDelayedExpansion
echo { >>post.json
FOR /F "tokens=1,2 skip=1 delims==" %%a in (hardware.txt) do (
set temp=%%a
set res=%%b
call :Trim result !...
0
votes
1
answer
8k
views
jq filtering - Cannot index array with string ""value"
I am trying to get the application name and print its corresponding apiDefinition for a specific key which is embedded in the value parameter. I get error "Cannot index array with string"
As ...
0
votes
0
answers
190
views
Rest API w/ JsonServer in Ubuntu - Connection Refused
I was requested to create a Web Server with an API in it to test firewall rule we are planning to implement soon. I am quite new with all this network stuff, so I'm a bit lost on it.
I need to call ...
2
votes
1
answer
1k
views
In PowerShell, how to save a DateTime variable into a file to be retrieved later?
I want to log the timestamp when a certain line is executed so that the script can know how long it has passed since last execution of that line, even if the script is stopped in between and the ...
0
votes
1
answer
187
views
Prevent the youtube-dl process fork when downloading metadata for a video in a playlist
Storing the metadata for a video using in a file using youtube-dl can be done in bash by calling
youtube-dl -j https://www.youtube.com/watch?v=${video_id} > metadata.json
However, when the video ...
1
vote
0
answers
475
views
Search for the object with a known value in JSON
Let's say I have a JSON like the following but with much more data and much more nesting
{
"dont_want_1": {
"a": 1
},
"dont_want_2": {
"b": 2
},
...
3
votes
1
answer
4k
views
Ubuntu/WSL disappeared from Windows Terminal?
I am using WSL/Ubuntu 20.04 on Windows Terminal, and I wanted to change my font color. When I copied settings into my settings.json file, the Ubuntu profile disappeared from Windows Terminal`.
My ...
2
votes
1
answer
29k
views
Extract element from JSON array with jq
I have the following JSON file inp.json:
{
"x": 0,
"tx": [
{
"id": "a",
"t" : "t for a"
},
{
"id": "b"...
1
vote
1
answer
3k
views
How can i convert a .bin file to a .json file [closed]
There is a ".bin" file on my pc that i want to convert. I tried to do it with a ISO reader but it wont work. The only thing i know about this file, it stores some json data that i want to ...
1
vote
0
answers
94
views
How stop multiples projects in vscode with the launch.json
I have in my launch.JSON a configuration that allows me to start two different API projects at the same time (Web API One and Web API Two), both are components of the same project, everything works ...
3
votes
2
answers
6k
views
Can i get excel to retain the format of this JSON cell?
I've pasted this json into a cell in excel
{
"Name": [
"OldName",
"NewName"
],
"Address[Id: 1].Postcode": [
"AL10 8DN&...
0
votes
2
answers
331
views
Is there a keyboard shortcut to select text at random location and climb to the top with one click?
As you can see, there are more than 70000 lines, it would take a lifetime to climb to the top using SHIFT + Page Up or SHIFT + UP ARROW.
Is there any shortcut to getting to the top quickly?
11
votes
2
answers
2k
views
parsing json in bash with pipe operators
I'm using the AWS CLI client to get the status of a snapshot but the output is in JSON. eg.
{
"DBClusterSnapshots": [
{
"AvailabilityZones": [
...
1
vote
1
answer
1k
views
Change one .json key value with an already existing one using jq
My test.json file contains the 2 keys:
{
"id": "123",
"name": "John"
}
And I want to achieve something like this:
{
"id": "John"...
0
votes
1
answer
1k
views
JSON conversion in Power Query - how automatically get list of object property names
This is a question based on comment in Excel: Power Query - how to repeat block of code for each row in a table.
Let's say we have a JSON with array of object each with N properies:
{
"data&...
1
vote
1
answer
14k
views
jq and array of two things: key and value
I have this script:
curl -sX 'GET' \
'https://api.coingecko.com/api/v3/exchange_rates' \
-H 'accept: application/json' | jq -rc '.[]|select(.)|keys,(.[].value|tostring)'
and the source of the ...
0
votes
1
answer
3k
views
Splitting Multi-valued JSON elements into an Array with PowerShell
I'm working with some JSON data in PowerShell. Some elements are multi-valued, delimited with a semi-colon, but its not always the same elements that are multi-valued. I would like to convert multi-...
0
votes
1
answer
2k
views
How to convert a plain txt file to json format
I have a huge plain txt file which its content is:
p1=a05b518f35e9f55a37d27965f3bf8735|p2=dabfa1619199d358d5ee7a38768a564a|p3=...
I want to convert it to JSON format with a pn-hash pair. I found this ...
0
votes
0
answers
86
views
Power Query to extract JSON parameter values from the data
Hope you are doing well!...I am trying to split the different parameter values for just the correct ,added and removed codes at a vbillid level..In the attached excel file the column codemap has the ...
0
votes
1
answer
3k
views
Import XML or JSON data into Excel using URL from a cell
I have an API call to make from my Excel spreadsheet that will have various parameters depending on the data entered in the spreadsheet.
I have formatted the URL properly and have it in a cell that is ...
0
votes
1
answer
485
views
List of JSON strings as command arguments
I've been working with GitLab CI recently to automate some busy tasks, namely auto releasing binaries for version tags.
For those who don't know Gitlab CI, it is very straightforward. It pulls the ...
0
votes
0
answers
4k
views
JSON error - Expecting 'EOF', '}', ',', ']', got '{'
I have a big json file but don't know it shows some error...
{
"_index": "ttmnt",
"_type": "********ils",
"_id": "********DC",
"...
-2
votes
1
answer
3k
views
How can i convert a .bin (binary) to a .json (json) file with linux?
I don't know how to convert a binary file back to a .json file. I have been searching for a while now and could not find a single answer, well, i did but none of which worked.
Can this be done in ...
1
vote
0
answers
22
views
Firefox strange JSON null respone
I was browsing a blog, I think made on wordpress, and when I clicked on an interal link I got a strange response, my firefox browser returned the JSON viewer with a NULL response.
Then I refreshed the ...
0
votes
1
answer
464
views
How do I use the dejsonlz4 tool?
Would somebody mind explaining how to use the dejsonlz4 tool in very basic laymans terms?
https://github.com/avih/dejsonlz4
I recently formatted a drive and lost my Firefox bookmarks as I forgot to ...
1
vote
3
answers
904
views
How to remove white space after parsing from JSON with sed
How can I remove any white space if any after parsing from JSON?
whereami -r Parse result without sed.
{
"ip": "95.16.15.10",
"country_code": "US",
"...
1
vote
1
answer
6k
views
Notepad++: how to automatically format JSON when opening the file
I work with many JSON files.
It would be useful to automatically format JSON when opening the file in Notepad++.
At the moment, I'm using JSON viewer plugin. I have to select the text and choose ...
1
vote
1
answer
100
views
Strange tar archive
I have few files that were transferred from another server. The files suppose to contain archive of directories with code and data.
files have .tar extension.
When I run:
tar -xvf xxxxx.tar
I get the ...