21
heyheni
5y

Can someone please build an SVG vector file format equivalent that uses json instead of xml? k thnx! 😆

Comments
  • 8
    I actually really like this idea. I will take on your challenge! (pls don't expect results. I'll probably fail hard.)
  • 6
    Will be tricky when you stumble over filters and anchors...good luck...and let us know once you succeeded
  • 6
    But why??
    Maybe you could propose a JSON to SVG transpiler?
    But would you also write web sites in JSON rather than XML/HTML?
  • 2
    @TempestasLudi you say that as if a defense of html's "xmlness" is a good thing, but honestly I'm taking it as a chance to imagine writing sites in json! it may not be practical but it's interesting!

    and of course not. who still uses html anyways? write in markdown, convert to html.

    wowowowowowoowow. wait... markdown svgs? now I'm trying both!
  • 0
    @deadPix3l markdown svg? hahaha genious! 😆
  • 2
    https://jsfiddle.net/498trozb/
    But it just translates json properties to html attributes. No sub elements right now.
  • 3
    @deadPix3l I am not defending HTML's XML-ness as a good thing. I am just asking whether you realised that HTML is actually also almost XML, which seems to work quite well.
    Note: If you have ever tried to create a complex UI using code (android, winforms, javafx), you are probably so happy that we have HTML for web pages :)
  • 1
    @Pogromist cool! I like that!
  • 0
    @TempestasLudi ahh gotcha. I do realize that and I greatly dislike it. I can appreciate that for complex things it can be be good, but for basic uses I think markdown is extremely clean and great. i think a system where markdown is not transpiled into html but is THE main source, maybe with JSON filling in the gaps could actually be really beautiful and elegant.
  • 2
    @deadPix3l Okay, maybe you are right :)
    For documents with a linear structure and mainly text, markdown works fine. However, for creating a web application, with structure, boxes etc. you will need HTML or something similar.
    I do not yet really see how JSON is better at handling complexity than HTML.
  • 2
    ... so I have a mock-up done. and it's semi workable. might post in a few days once I fix some things and maybe write tests.

    fair warning: it's kind of awful. it's longer, less practical, and overall worse than standard SVG. admittedly XML isn't very good for most things, but for SVG, it actually is ideal I think.
  • 0
    @deadPix3l 👍 awesome!
  • 1
    just to update: I've decided not to release it. if you would actually like, I will present what I have so far, but it's horribly ugly. json is not suited for this. and actually getting it to render is even harder.
  • 0
    @deadPix3l 🙂 thank you very much for trying 👍
Add Comment