Code review: JSON unmarshaller

Jacob Carlborg doob at me.com
Wed Oct 17 23:35:42 PDT 2012


On 2012-10-17 21:44, Tyler Jameson Little wrote:
> Here's the updated code. It's got a marshaller and unmarshaller:
>
> https://gist.github.com/3894337
>
> It's about 650 lines. If you have time, I'd be very interested in
> getting some feedback (or from anyone else who sees this post of course).
>
> The main problem I'm having right now is that classes/structs have to be
> static. I'm not 100% sure why the compiler cannot see non-static
> classes/structs at compile time. Do you happen to know why? It seems
> like a template should work in either case, assuming I'm understanding D
> templates correctly.

What do you mean with "static structs/classes"? Are you talking about 
nested classes and structs?

> I didn't find any clear documentation for static outer classes, only
> static inner classes. It's not the same as static Java classes, which
> cannot be instantiated (if memory serves).


-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list