fixes #10071. The problem is that the json.h file includes the local variant.h instead of the "absolute" core/variant.h