You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exact same code can be run in git bash, but an error will be reported in batch: json_typegen config/global_config.json -o code_template/rust/global_config.rs -n GlobalConfig --options "{ derives: 'Default, Debug, Clone, PartialEq, Serialize, Deserialize, Resource' }"
error: The argument to 'derives' has to be a string literal, but remaining input was ''Default, Debug, Clone, PartialEq, Serialize, Deserialize, Resource' }'
That really confuse me.
The text was updated successfully, but these errors were encountered:
I think the issue here is that the option parsing only supports double quoted string literals ("I am a string") and not single quoted strings ('I am a string') for option values, so the invocation should be json_typegen config/global_config.json -o code_template/rust/global_config.rs -n GlobalConfig --options '{ derives: "Default, Debug, Clone, PartialEq, Serialize, Deserialize, Resource" }'
I might have a look at supporting single quoted string literals, but it might take a while before I get to that.
The exact same code can be run in git bash, but an error will be reported in batch:
json_typegen config/global_config.json -o code_template/rust/global_config.rs -n GlobalConfig --options "{ derives: 'Default, Debug, Clone, PartialEq, Serialize, Deserialize, Resource' }"
error:
The argument to 'derives' has to be a string literal, but remaining input was ''Default, Debug, Clone, PartialEq, Serialize, Deserialize, Resource' }'
That really confuse me.
The text was updated successfully, but these errors were encountered: