Add to json only if we have flags