Archive for the ‘JSON’ Category
Posted by jpluimers on 2026/04/16
Amazon has activities spread across many different countries and regions, heck they even own their own toplevel domain .amazon.
Yesterday in Online tools to test JSONPath Queries (plus a small list of Amazon top level domains) I wrote about the JSON parsing I did for Download your Kindle books soon, because Amazon will block them after February 25, 2025 .
The source of that list is [Wayback/Archive] Amazon operating domains by country. · GitHub [Wayback/Archive] in the file amazon-domains.json.
In the meantime, I finally managed to go through a list of old open browser tabs having more of such lists. Here they are:
Read the rest of this entry »
Posted in Software Development, Development, Web Development, Scripting, JavaScript/ECMAScript, JSON, JSONPath | Leave a Comment »
Posted by jpluimers on 2026/04/15
I wanted to parse some JSON being sent back during an XMLHttpRequest (what a wrongly named call is that!) of which I grabbed the content using the web development tools of my Chromium based browser.
Input
I got this list of amazon top level domain names from research I did for my blog post Download your Kindle books soon, because Amazon will block them after February 25, 2025 . The source is [Wayback/Archive] Amazon operating domains by country. · GitHub [Wayback/Archive] in the file amazon-domains.json:
{
"us": "https://www.amazon.com",
"uk": "https://www.amazon.co.uk",
"ca": "https://www.amazon.ca",
"de": "https://www.amazon.de",
"es": "https://www.amazon.es",
"fr": "https://www.amazon.fr",
"it": "https://www.amazon.it",
"jp": "https://www.amazon.co.jp",
"in": "https://www.amazon.in",
"cn": "https://www.amazon.cn",
"sg": "https://www.amazon.com.sg",
"mx": "https://www.amazon.com.mx",
"ae": "https://www.amazon.ae",
"br": "https://www.amazon.com.br",
"nl": "https://www.amazon.nl",
"au": "https://www.amazon.com.au",
"tr": "https://www.amazon.com.tr",
"sa": "https://www.amazon.sa",
"se": "https://www.amazon.se",
"pl": "https://www.amazon.pl"
}
The list is far from complete, so tomorrow I will post some more sources in Some pages that have lists of Amazon toplevel domains.
The queries and results show you that the original JSONPath (2007) and its RFC 9535 definition (2024, just 2 years ago) do not support getting the key names of the above list the ~ part in the first query below fails, and only the second query works.
This means that finding the right tooling is important.
Example
Read the rest of this entry »
Posted in Conference Topics, Conferences, Delphi, Development, Event, JavaScript/ECMAScript, JSON, JSONPath, PHP, Python, Scripting, Software Development, TypeScript, Web Development | Tagged: 2852 | Leave a Comment »
Posted by jpluimers on 2025/10/28
For my link archive initiated because I was trying to find out why ADS-B Exchange does not list originating and destination airports for flights, then on how to get at that data.
It is grouped in a few parts, starting with:
Read the rest of this entry »
Posted in Communications Development, Development, HTTP, Internet protocol suite, JavaScript/ECMAScript, JSON, REST, Scripting, Software Development, TCP, Web Development | Leave a Comment »
Posted by jpluimers on 2025/07/01
Since this question keeps popping up around me every now and then, despite JSON being around for like 25 years now, this statement from the original designer Douglas Crockford:
[Wayback/Archive] Douglas Crockford – Google+ – Comments in JSON …
I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn’t.
Suppose you are using JSON to keep configuration files, which you would like to annotate. Go ahead and insert all the comments you like. Then pipe it through JSMin before handing it to your JSON parser.
Yup, Google+ has been dead for more than 6 years now, so it is important to quote these insights for posterity to find them back.
Related:
Via: [Wayback/Archive] Can comments be used in JSON? – Stack Overflow with several answers mentioning the above G+ post.
Query: [Wayback/Archive] json comment – Google Search
--jeroen
Posted in Development, JavaScript/ECMAScript, JSON, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2025/03/06
Two sites that can help you out getting weather info on the console:
wttr.in
wttr.in is developed by [Wayback/Archive] Igor Chubin (@igor_chubin) / X and looks at the request header to figure out what kind of output it sends.
It supports various output formats, so on my TODO list is to see how they do their mapping: always an opportunity to learn (it’s based on Python and Go so I am curious what libraries they use as well).
From the documentation:
wttr.in currently supports five output formats:
- ANSI for the terminal;
- Plain-text for the terminal and scripts;
- HTML for the browser;
- PNG for the graphical viewers;
- JSON for scripts and APIs;
- Prometheus metrics for scripts and APIs.
The ANSI and HTML formats are selected based on the User-Agent string.
There are more parameters in the documentation on the main page of the repository and through this command:
curl wttr.in/:help
The idea is derived from [Wayback/Archive] GitHub – schachmat/wego: weather app for the terminal.
Oh: Igor has more repositories at [Wayback/Archive] chubin (Igor Chubin) · GitHub (including [Wayback/Archive] GitHub – chubin/cheat.sh: the only cheat sheet you need which is hosted at [Wayback/Archive] cheat.sh; I thought I had blogged about that before, but found it only in a draft note mentioning that I got it via [WaybackSave/Archive] Nicolas Krassas on X: “The only cheat sheet you need cheat.sh“)
7timer
A 7 timer JSON usage example is at [Wayback/Archive] Get Weather from 7Timer! · GitHub
It has documentation at
Output formats can be chosen from HTML, PNG, XML and JSON.
Via
[Wayback/Archive] Hacker Public Radio – hpr4266 :: What’s the weather?
Lee writes a script to check what the weather is like ~ The Technology Community Podcast
HPR is a great podcast series!
--jeroen
Posted in *nix, *nix-tools, ash/dash, bash, bash, Development, Go (golang), JavaScript/ECMAScript, JSON, Power User, Python, Scripting, Software Development, Web Development, XML/XSD | Leave a Comment »
Posted by jpluimers on 2024/12/17
Finally an easier way to convert Office documents (and other formats) to markdown: [Wayback/Archive] GitHub – microsoft/markitdown: Python tool for converting files and office documents to Markdown. (after Google added a Markdown export feature to Google Docs about half a year ago, and basic Markdown formatting about 2 years ago – see below):
There are quite a few dependencies in [Wayback/Archive] markitdown/pyproject.toml at main · microsoft/markitdown · GitHub, so be prepared for that.
Supported formats (added links for clarity):
The MarkItDown library is a utility tool for converting various files to Markdown (e.g., for indexing, text analysis, etc.)
It presently supports:
- PDF (.pdf)
- PowerPoint (.pptx)
- Word (.docx)
- Excel (.xlsx)
- Images (EXIF metadata, and OCR)
- Audio (EXIF metadata, and speech transcription)
- HTML (special handling of Wikipedia, etc.)
- Various other text-based formats (csv, json, xml, etc.)
Google was first though:
- [Wayback/Archive] Google Workspace Updates: Compose with Markdown in Google Docs on web
- [Wayback/Archive] Google Workspace Updates: Import and export Markdown in Google Docs
There is speculation on why Microsoft introduced it just now ranging from “they need it for AI training” to “just late to the game”. I’m with the latter. Apple is even later, so if you want to convert Apple Notes to markdown, then you can use [Wayback/Archive] Import from Apple Notes – Obsidian Help.
Via various sources, including:
Read the rest of this entry »
Posted in CSV, Development, Excel, HTML, HTML5, JSON, Lightweight markup language, MarkDown, Office, PDF, Power Point, Power User, Software Development, Word, XML/XSD | Tagged: MarkDown, Python | Leave a Comment »
Posted by jpluimers on 2023/10/17
Posted in *nix, *nix-tools, bash, bash, Development, JavaScript/ECMAScript, jo, jq, JSON, man/manual pages, mankier, Power User, Python, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2023/08/29
Often the power is in the combinations of tools.
Read until the epilogue…
Prologue
In this case, I needed to be able to query the JSON results of calls to REST services from the command-line so I could process them in Batch files.
Since I could not find anything readily available, I originally Originally I opted for the PowerShell command-line scripting tool, as that ships with recent Windows versions and can re-use anything that .NET brings. But though [Wayback/Archive] .NET has built in JSON serialization support, there is [Wayback/Archive] no querying support in it.
Then I thought about Delphi, as it [Wayback/Archive] too has a built-in JSON parser, but even the well known [Wayback/Archive] JSON SuperObject library has no query support.
Back to .NET, which – like Delphi – has a well known and respected third party JSON library as well: [Wayback/Archive] NewtonSoft JSON aka JSON.net and that one [Wayback/Archive] does have support for querying JSON with the SelectToken function.
That’s the fundament of the rest of this article, with the potential to be used in a cross-platform as well.
So no need for a plan B.
Read the rest of this entry »
Posted in *nix, *nix-tools, .NET, Batch-Files, Conference Topics, Conferences, Development, Event, JavaScript/ECMAScript, jq, JSON, Power User, Scripting, Software Development, Windows, Windows Development | Leave a Comment »