Make the json serialization test independent of json implementation.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>