fix compiler warnings
add basic json validity quickcheck test