Fixed has_shape to handle nested json properly.