digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

808
active users

#json

7 posts7 participants0 posts today

#cli: extract structure from a blob of #json data

cat very-large-file.jsonl | jq -r 'paths(scalars) | map(tostring) | join(".")' | perl -ne 's/[.][0-9]+(?=[.]|$)/.[]/g; print' | python -c $'import sys\na=set()\nfor l in iter(sys.stdin.readline, ""):\n if l in a: continue\n sys.stdout.write(l)\n a.add(l)' > schema-like.txt

🌘 Ruby JSON 函式庫 API 問題探討
➤ 深入解析 Ruby JSON 函式庫的 API 設計弊病與安全風險
byroot.github.io/ruby/json/202
本文深入探討 Ruby JSON 函式庫 API 的設計缺陷與潛在安全隱憂,特別是 `create_additions` 選項的危險性,並提出作者作為新維護者將進行的 API 調整與棄用計畫,包括使用 `JSON.unsafe_load` 取代含隱含 `create_additions: true` 的 `JSON.load`,以及引入更安全靈活的 Callback 機制來處理物件解析,同時也觸及了 JSON 格式本身對重複鍵處理的模糊性。
+ 終於有人願意深入探討 JSON 函式庫的這些細節了!`create_additions` 的確是個隱藏的炸彈,很高興看到有改進計畫。
+ 作者對於如何處理 Ruby 的警告機制分析得很透
#Ruby #JSON #API設計 #效能 #安全性 #棄用

byroot’s blog · What’s wrong with the JSON gem API?As I mentioned at the start of my Optimizing Ruby’s JSON series of posts, performance isn’t why I candidated to be the new gem’s maintainer.
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 🖤📖