Thread: Some parsers
View Single Post
  #29  
Old 05-02-2008, 10:37 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Skyld View Post
I'm not saying not to release parsers. It's just there are probably infinitely more useful formats out there. For instance, nobody's invented a JSON interpreter yet, and that could be very beneficial with the rising use of HTTP requests (and occasionally, sockets).
;o Well, I'm out of ideas of what to make parsers for.. So ideas/suggestions would be nice :o

And, by JSON, you mean parsing something like..

NPC Code:

{
"firstName": "John",
"lastName": "Connor",
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": 10021
},
"phoneNumbers": [
"212 555-1234",
"646 555-4567"
]
}



and turn it into something like
NPC Code:

this.firstName = "John";
this.lastName = "Connor";

this.address = new TStaticVar();
this.address.streetAddress = "21 2nd Street";
this.address.city = "New York";
this.address.state = "NY";
this.address.postalCode = 10021;

this.phoneNumbers = {
"212 555-1234",
"646 555-4567"
};



just curious, a JSON interpreter sounds interesting, but I dunno if I fully understand what 'interpreter' means.. so.. dunno if the stuff above is correct
__________________
Reply With Quote