json

From twext

Jump to: navigation, search

json sounds good

  • gabriel digs it
  • faster than xml
  • can do what dodo wants for now

but may have downsides

twext data design wants a few things

  1. easy to read by humans
  2. easy to read by machines
  3. easy to share, fix, learn from

[edit] horizontal for machines

json sounds easy to read by machines.. sounds like maybe chunked data needed to make a twext text can fit on one horizontal line.. good for machines.. ,then we could also maybe copy some info if need be for easy human reading.. maybe arraying chunks vertically

gabriel wrote in twexml in json something like this:

{twext:{par:{chunk:{text:cada trozo, twxt:each chunk}}.}

it was on a napkin so probably needs fixing

anyway, if i get it right, a twext doc (at least for something manageable like a little song) can be json'd in a long, single, horizontal line of text..

[edit] vertical for humans

if we json data in one line for machines, then vertical space is open for text easy for humans to read.. basically we copy machine info from first line into human readable format.. (note: at one time we did have ascii twext)

{twext:{par:{chunk:{text:cada trozo, twxt:each chunk etc -> etc -->>}}.}
twext type of data
ESPANOL TEXT LANGUAGE
english twxt language
TITLE doh btw hash or timestamp required, title optional
tags later

..TEXT
todos
los trozos
sin
ni madre
de
markup fea
estorbando
jodiendo

..twxt
all
the chunks
without
bullcrap
of 
ugly markup
in our face
screwing us up

in single twext source file represented above, program prints separate ..TEXT ..twxt areas in xcroll editable interface

just playing here, looking for the right info.. we want

  1. data easy for machines to read
  2. data easy for humans to read, fix
  3. data on one text file that can be versioned (via git, dodo, json)

[edit] single file

storing twext data in a single file sounds better than twext folders idea of storing in separate files.. in separate files, it's pretty easy to see that the chunk line 55 in TEXT corresponds to the chunk translation line 55 in TWXT.. but it feels like the simplest of programs can, from a single file, print the equivalent in a xcroll interface.. it's a fact that there will never be any twext without xcroll

i'm liking the idea of twext data shared in flat text files.. why?

  • can feed any database but not be stuck in database
  • findable/shareable anywhere online
  • text files are idiot proof (i need this)
    • if software processing text files breaks, then text file does not break
    • i hate programs that bork then bork my access to my data
    • just gimme the data any way i can get it
    • i like command line and i love sound of git versioning
      • maybe with some kinda shell for dodo, later
  • shared data means more data to fix automagic chunking/translation

down the road map, it'd be cool if we can find twext data in the URL

Retrieved from "http://twext.com/json"
Personal tools