Fix warnings at json compilation
Code simplification