Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom derserialize for support u8 and seq directly #71

Closed
wants to merge 2 commits into from

Conversation

zwpaper
Copy link

@zwpaper zwpaper commented Jan 20, 2021

Hi,

I have created a custom deserializer for Colour, after using the custom one, we can deserialize like below:

{"colour": "Red"}
{"colour": 255}
{
  "colour": {
    "Fixed": 255
  }
}
{"colour": [255,255,255]}
{
  "colour": {
    "Red": [255,255,255]
  }
}

this keeps the compatibility and provided a more convenient way to deserialize Colour

@zwpaper
Copy link
Author

zwpaper commented Jan 21, 2021

looks like channel 1.28.0 can not cowork with serde_json v1.0.61?

copied logs from AppVeyor:

Downloading serde_json v1.0.61
error: unable to get packages from source

Caused by:
  failed to parse manifest at `C:\Users\appveyor\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\serde_json-1.0.61\Cargo.toml`
Caused by:
  editions are unstable
Caused by:
  feature `edition` is required
this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["edition"]` to enable this feature

@zwpaper
Copy link
Author

zwpaper commented Mar 16, 2021

hi @ogham ci passed, could you spend some time to review this PR?

@zwpaper zwpaper closed this Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant