Nmap Development mailing list archives
Re: json library
From: David Fifield <david () bamsoftware com>
Date: Fri, 1 Jul 2011 09:22:45 -0700
On Wed, Jun 29, 2011 at 10:29:20AM -0500, Daniel Miller wrote:
Lua has a built-in way to signal different behaviors: metatables. Here's a patch for the json library that checks the metatable for a "json" key. It can be set to "array" or "object", to override the default behavior.
This is clever, Daniel. I don't know if it's the best solution, but it seems all right. Don't forget the other part though--json.parse needs to set the metatable entries. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: json library David Fifield (Jul 01)
- <Possible follow-ups>
- Re: json library David Fifield (Jul 01)
- Re: json library Daniel Miller (Jul 01)
- Re: json library Toni Ruottu (Jul 03)
- Message not available
- RE: json library Daniel Miller (Jul 03)
- Re: json library Toni Ruottu (Jul 03)
- Re: json library Daniel Miller (Jul 01)