Giter Site home page Giter Site logo

Comments (4)

fiatjaf avatar fiatjaf commented on August 20, 2024

That's cool, but my approach to this is that any new thing we force everybody to support becomes a hurdle for implementors and reduces the chances of the protocol to be successful.

Having two ways of doing the same thing goes very against what I think is right for a protocol. It's exponentially better to have a single way, even if that way is very bad.

from nostr.

lenormf avatar lenormf commented on August 20, 2024

Since JSON5 is a subset of JSON, valid JSON is valid JSON5. That means that supporting JSON5 on the relayโ€™s side could be made optional, and that would allow users to write more human readable events.

from nostr.

fiatjaf avatar fiatjaf commented on August 20, 2024

I don't think it's possible to write events by hand since they require cryptographic hashes and signatures. Also at least in my mind no one should be writing these events by hand at all. Each event must have a different kind of content based on its kind, and besides "text_note" events they will all be weird and unreadable already, I imagine.

I sympathize with your desire to have human-readable stuff (for example, I like how HTTP is human-readable and HTTPS/HTTP2 are not), but I think just normal JSON is already fairly readable, specially if you format it in a pretty way. And there could be client-side tools that allow you to convert JSON5 or YAML or other stuff into standard JSON events, if you have a use case for that.

Also, from the standardization side, asking implementors to support JSON5, even if only JSON5, is worse than asking them to support JSON, because JSON is already built-in in all languages and standard libraries, JSON5 is not.

from nostr.

lenormf avatar lenormf commented on August 20, 2024

Fair.

from nostr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.