onipa 🇬🇭📖
Currently appreciating the beauty of JSON (and its mascot?)

I'm working on a little project a lexicon/dictionary called texdict.py (name suggestions welcome). The #python script attempts to convert a #TeXLaTeX file with glossaries commands (https://ctan.org/pkg/glossaries) and some extra commands (which might be released under texdict.sty (or similar name)) into JSON format and vice-versa. JSON is so nice because it's human readable and computer readable.

Do you know of any #LaTeX packages and or #JSON based libraries related to #dictionaries or #lexicon

Also, I thought about using the texdict.sty file as the only source of truth for the tex2json and json2tex mapping, but haven't figured it out yet. Any leads would be highly appreciated 🖤📖💽
Marcos Dione

Who hasn't seen JSON on JSON a.k.a. JSON encoded JSON. As in:

```
{ "a": "{ \"b\": 0 }" }
```

Why do people even do that? Why not

```
{ "a": { "b": 0 } }
```

Also: has anyone ever seen YAML encoded YAML? Does it even exist?

All this just to promote my new tool:

codeberg.org/mdione/jsjs

#JSON #developer

jsjs

A small tool to convert from/to JSON on JSON.

Codeberg.org
Stéphane Bortzmeyer

Side discussion at #IETF123. Is there an equivalent of #CSS for #JSON (to control the presentation of the JSON you send)? Any ideas?

Habr

Регистрация событий в Astra Linux Special Edition

В статье вы найдете краткий обзор подсистемы регистрации событий - собственной разработки команды ОС Astra Linux. Всё, что будет описано ниже, актуально для самой новой на момент написания статьи версии Astra Linux Special Edition - 1.8.2. Поехали!

habr.com/ru/companies/astralin

#astra_linux #логирование #syslog #информационная_безопасность #json #конфигурация

Регистрация событий в Astra Linux Special Edition

Всем привет! Меня зовут Михаил, и, как некоторые уже…

Хабр
𝕂𝚞𝚋𝚒𝚔ℙ𝚒𝚡𝚎𝚕

JWTs Are Not Session Tokens , Stop Using Them Like One

When JSON Web Tokens (JWTs) hit the mainstream, they were hailed as the solution to everything wrong with session management. Stateless! Compact! Tamper-proof! Suddenly, everyone started stuffing them into every web app like ketchup on bad code.

🧑‍💻 archive.fo/01UkP

#json #jwt #webdev #token #web #code #bad #badcode #WebTokens #ketchup

mirabilos

“Fun” learning YAML properly?

Okay. So. I have to learn ANSI-Bell for $ork. Meh. But okay.

Pre-existing “fun”

Playbooks are written in YAML. I hate YAML and have always used yaml2jsn to convert it to JSON (if possible) when I had to touch it in the past, as somehow a subset¹² of JSON is a valid subset of YAML accepted² by YAML parsers.

① you’ll have to make sure you don’t emit some codepoints literally, and to format numbers in scientific notation a specific way, but that’s generally a good advice for JSON emitters
② except JSON strings have codepoints outside the Basic Multilingual Plane encoded as two UTF-16 surrogates in \u#### notation whereas YAML parsers require it to be unescaped four-octet UTF-8, which breaks many JSON parsers; I ran into that just this week, in fact, for my RSS to Fediverse gateways…

I personally find YAML unwritable, due to things like GitHub Actions’ example of…

on: push: branches: - main

… does not convert to…

{ "on": { "push": { "branches": [ "main" ] } } }

… but to:

{ "1": { "push": { "branches": [ "main" ] } } }

(GitHub accepts both syntacēs in workflow files in JSON.)

But let’s go back to the “self-explaining, obvious” YAML:

on: push: branches: - main

So, we’ve already established that “on” is 1 and that something like country: no isn’t Norway but 0 (and real existing people have fallen into this, yet there are strong recommendations to not quote strings in YAML documents like ANSI-Bell playbooks, and somehow nobody even documents how strings are to be escaped and when they need to be escaped).

But, riddle me this:

push: <2 spaces>branches:

But:

branches: <2 spaces><hyphen-minus and space>main

But:

options: <no space><hyphen-minus and space>Ubuntu <no space><hyphen-minus and space>macOS

(All examples from here.)

I find this totally obvious and self-explanatory and consistent, and I totally know when to use two spaces, or dash-plus-space, or both.</sarcasm>

But there is training material!

One of the books I’ve been provided (actual published training material with an ISBN each) just hand-waves it away, the other says:

The target section looks like the following code snippet:

- hosts: webservers user: root

[…] As per the YAML syntax, the line must start with a dash. […]

So, basically, the hosts: line must start with a dashhyphen-minus? I think not.

The “Hands-on interactive lab and helpful resources” in the Red Hat “YAML essentials for Ansible” “learning path” is similarly deficient in even fundamentally basic explanation. 0/10, won’t recommend.

Fun with training material, continued

The hand-waving book links to http://www.yaml.org/start.html, so let’s read…

a getting started guide for YAML

… in my favourite webbrowser lynx:

Page not found · GitHub Pages File not found The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL as well as any file permissions. For root URLs (like http://example.com/) you must provide an index.html file. [1]Read the full documentation for more information about using GitHub Pages. [2]GitHub Status — [3]@githubstatus Edit this document's URL: https://yaml.org/start.html

… oooookay?

But surely yaml.org has more material? *looks* … well, it has links to the specs and implementations. All very useful, but not right now for a hopefully structured introduction that explains the hows and ideally also the whys.

Let’s follow the *New* link in which they announce the 1.2.2 spec… a blogpost. Okay. It has a title bar (brown background in Firefox) with a promising link:

Y * * [2]Blog * [3]Docs

Let’s follow #3 to “Docs”!

←←← Twitter [1]Skip to main content Y * * [2]Blog * [3]Docs * * [4]YAML Glossary [5]YAML Cheat Sheet (BUTTON) Menu YAML Documentation __________________________________________________________________ YAML documentation is on the way! #content

This 80×24 screenshot is literally the entirety of the official #YAML documentation.

Well, colour me impressed.

Wait, no.

Fuck that shit.

Wait. This is for $dayjob. $customer also edits playbooks. I’m sure they’ll be delighted if I run things through yaml2jsn and commit the result as #JSON.

Also, see footnote 2 above.

Fuuuuck I’m SOL.

So. Do I honestly have to wade through the spec to learn this?

(Not that this is new. When I first learnt Python in 2008, I had to look at the C-language source code of the #Python interpreter to figure out things missing from the documentation. Which brings us back full circle to #ansible, the culprit of bringing this entire shitshow to my attention. I’m a programmer, not a DevCloudOp or something.)

Anthony Accioly

Playing with Go 1.25 RC… encoding/json/v2 is sweet and noticeably faster than what we have right now.
(That said, since I can still marshal and unmarshal JSON faster using plain old "slow" Java, I'm only giving Go a half-win here.)

antonz.org/go-json-v2/

#Golang #json #rc

JSON evolution in Go: from v1 to v2

Reviewing the key changes in json/v2.

antonz.org
TeX Users Group

From #CTAN:

Jasper Habicht submitted an update to the jsonparse package.

Version: 1.6.3 2025-06-20
License: lppl1.3c

Summary description: Parse, store and access JSON data in LaTeX documents

ctan.org/pkg/jsonparse

#TeXLaTeX #json

CTAN: Package jsonparse

ctan.org
Frontend Dogma

I Copy These 10 Code Snippets Into Every Project, by (not on Mastodon or Bluesky):

archive.fo/NWE6H

#javascript #debouncing #json #objects #arrays

GripNews

🌖 用四十行 Awk 解析 JSON
➤ 在 shell 環境中輕量級的 JSON 解析方案
akr.am/blog/posts/parsing-json
本文介紹瞭如何在 POSIX shell 環境中使用 Awk 撰寫一個簡單的 JSON 解析器,避免了對外部工具(如 jq)的依賴。作者分享了在沒有 Python 的情況下,為了滿足現有 shell script 的需求,而用 Awk 實現 JSON 解析的經驗。該解析器具有基本驗證功能,並提供了一個簡單的介面,能根據提供的路徑提取 JSON 中的特定值。雖然在處理複雜 JSON 結構時可能存在限制,但對於來自受信任來源的簡單 JSON 數據,它提供了一個輕量級且可行的解決方案。
+ 哇,用 Awk 解析 JSON 真令人驚訝!雖然可能不如專門的工具那麼強大,但對於簡單的任務來說,這絕對是一個方便的選擇。
+ 這個方法很聰明,在沒有 Python 的情況下也能解決問題。對於需要在資源有限的環境中處理 JS
#程式語言 #JSON #Awk #Shell Script

Habr

[Перевод] Преобразование JSON в объекты C++ на этапе компиляции: демонстрация возможностей принятой в C++26 рефлексии

На прошлой неделе в Софии, столице Болгарии, закончилась работа над стандартом C++26 , который помимо контрактов , std::execution и всего прочего теперь включает и рефлексию. В этой статье будет продемонстрирован один из примеров её использования: преобразование строк в формате JSON в объекты C++ на этапе компиляции.

habr.com/ru/articles/922876/

#c++ #c++26 #json #boostjson #reflection #рефлексия

Преобразование JSON в объекты C++ на этапе компиляции: демонстрация возможностей принятой в C++26 рефлексии

На прошлой неделе в Софии, столице Болгарии, закончилась…

Хабр
Gytis Repečka

This meme is so good it has to be shared widely: {" :jason_statham: "}

#json #statham #meme