Added missing JSON type information.
Added 2D versions of Line and Polygon classes.