Add JSON deserializer utils

This is a rip from #230, adding some utils for the JSON
deserializer implementation.
`state chart`, not `net`.