Re: Proposal for 3.5: Make adding custom translators easy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/12/2013 03:52 PM, Justin Clift wrote:
On 12/08/2013, at 8:50 PM, Jay Vyas wrote:
okay makes sense.  so .. um How about json ? :)


Yeah, might be a bunch more readable.  Also easier to
work with from things like Node.js.

Just personally not sure how to structure it well
with JSON.

Suggestions? :)

Its much easier in json, as documents are embeddable, without so much syntactic noise.

From our tiburon product, boot.json file:

{
   "servers" : {
      "default" : "192.168.108.250"
   },
   "boot" : {
      "default" : {
         "address" : "servers.default",
         "port"    : "3000"
      }
   },
   "nfs" : {
      "default" : {
         "address" : "servers.default",
         "mountpoint" : "/data/nfs"
      }
   },

   "targets" : {
     "nfs" : {
       "CentOS6.3_x64" : {

	//
	}
       }
      }
}

Very easy to parse with existing libraries, and mere mortals (and text editors) have a fighting chance at working with this.

As someone who worked with XML for more than a decade, and JSON for a few years, none of our projects are ever going to use XML again if we can avoid it. Since all of these json documents map nicely into various noSQL dbs (MongoDB, rethinkDB, etc.), its fairly trivial to go from config file to replicated data store. Which, I believe, solves another long standing problem.




--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics, Inc.
email: landman@xxxxxxxxxxxxxxxxxxxxxxx
web  : http://scalableinformatics.com
       http://scalableinformatics.com/siflash
phone: +1 734 786 8423 x121
fax  : +1 866 888 3112
cell : +1 734 612 4615



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux