Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr  ·  activity timestamp 4 weeks ago

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

  • Copy link
  • Flag this post
  • Block
™
@xmlarbyter@social.tchncs.de replied  ·  activity timestamp 4 weeks ago
@bortzmeyer Are you looking for JSON syntax highlighting?
  • Copy link
  • Flag this comment
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 4 weeks ago
@xmlarbyter No, selection o the content, ordering of the content, choice of the font, just like CSS.
  • Copy link
  • Flag this comment
  • Block
™
@xmlarbyter@social.tchncs.de replied  ·  activity timestamp 4 weeks ago
@bortzmeyer You can transform JSON data using XSLT in a new representation and/or format JSON strings in HTML content + CSS.
  • Copy link
  • Flag this comment
  • Block
GuB 💾
@gub@framapiaf.org replied  ·  activity timestamp 4 weeks ago
@bortzmeyer
Json est un format de données, pas de présentation. Par contre c'est pas très compliqué à afficher en HTML.
  • Copy link
  • Flag this comment
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 4 weeks ago
@gub Je sais bien que JSON est un format de données. Et je sais bien que le receveur du JSON peut en faire ce qu'il veut, y compris le transformer en HTML.
Ce que je cherchais est un moyen pour l'*envoyeur* de contrôler la présentation, d'où la référence à CSS.
  • Copy link
  • Flag this comment
  • Block
Charles de Lacombe
@charles@akk.de-lacom.be replied  ·  activity timestamp 4 weeks ago
@bortzmeyer @gub Tu peux préciser ce que tu entends par « contrôler la présentation » ? J’arrive pas à mettre le doigt dessus et j’ai l’impression que c’est intéressant.
  • Copy link
  • Flag this comment
  • Block
GuB 💾
@gub@framapiaf.org replied  ·  activity timestamp 4 weeks ago
@bortzmeyer
Aaaah ok.
Non pas d'idée 🤷‍♂️
  • Copy link
  • Flag this comment
  • Block
Olivier Aubert
@olivier_aubert@piaille.fr replied  ·  activity timestamp 4 weeks ago
@bortzmeyer presentation would be more HTML, so I would use json2html, then you can use CSS on top to further tweak presentation
  • Copy link
  • Flag this comment
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 4 weeks ago
@olivier_aubert How does it help? The goal is for the sender to control the presentation (as it is done with CSS) so we still need a language to control the JSON->HTML translation.
  • Copy link
  • Flag this comment
  • Block
Annika
@dlsym@chaos.social replied  ·  activity timestamp 4 weeks ago
@bortzmeyer aaah you mean like xslt? https://www.w3.org/TR/xslt-30/#json
  • Copy link
  • Flag this comment
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 4 weeks ago
@dlsym I did not even know it was possible...
  • Copy link
  • Flag this comment
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 4 weeks ago
@dlsym But XSLT is processing, not presentation.
  • Copy link
  • Flag this comment
  • Block
Annika
@dlsym@chaos.social replied  ·  activity timestamp 4 weeks ago
@bortzmeyer well it’s processed into a presentation. I mean what else would be the presentation of json be? Like you mean camel case vs snake case keys? :)
  • Copy link
  • Flag this comment
  • Block
Stéphane Bortzmeyer
@bortzmeyer@mastodon.gougere.fr replied  ·  activity timestamp 4 weeks ago
@dlsym No, XSLT, unlike CSS, does not allow you to choose font size, positions of elements, etc.
  • Copy link
  • Flag this comment
  • Block
Annika
@dlsym@chaos.social replied  ·  activity timestamp 4 weeks ago
@bortzmeyer uuuh well I can imagine you can generate html with inline style but I have the slight feeling we are talking past each other :)
  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.2.8 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct