Midway through implementing FromJson in types.go, moved some of the
parser code from lbconsole.go.