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
Similar to #2385, generated code can still override the built-in Option type when an array field is named options in the JSON data (I'm assuming since it makes the word singular and doesn't recognize the keyword).
use serde::{Serialize,Deserialize};#[derive(Serialize,Deserialize)]pubstructTest{options:Vec<Option>,}#[derive(Serialize,Deserialize)]pubstructOption{name:String,foo:Option<String>,}
Note the now invalid use of Option<String>
The text was updated successfully, but these errors were encountered:
Similar to #2385, generated code can still override the built-in
Option
type when an array field is namedoptions
in the JSON data (I'm assuming since it makes the word singular and doesn't recognize the keyword).Example input:
Output:
Note the now invalid use of
Option<String>
The text was updated successfully, but these errors were encountered: