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

add yaml support #476

Merged
merged 3 commits into from
Jan 13, 2023
Merged

Conversation

liberwang1013
Copy link
Contributor

Support yaml content type

ApiResponse,
};

/// A XML payload.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// A XML payload.
/// A YAML payload.

/// Parse from [`serde_json::Value`].
fn parse_from_yaml(value: Option<Value>) -> ParseResult<Self>;

/// Parse from XML string.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Parse from XML string.
/// Parse from YAML string.

/// Convert this value to [`Value`].
fn to_yaml(&self) -> Option<Value>;

/// Convert this value to JSON string.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Convert this value to JSON string.
/// Convert this value to YAML string.

@sunli829
Copy link
Collaborator

format code with cargo +nightly fmt

@sunli829 sunli829 merged commit d5f1a65 into poem-web:master Jan 13, 2023
@sunli829
Copy link
Collaborator

thanks

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.

2 participants