Adding test for JsonCoder

Tests for encode and decode incl. exceptions.