+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_json_formatter): JSON Formatting object #2570 #4040

Merged
merged 5 commits into from
Dec 15, 2022

Conversation

denbezrukov
Copy link
Contributor

Summary

Fix #2570 for Object value.

Open questions:
How can we reuse separated between json and js crate?

Test Plan

cargo test -p rome_json_formatter

@netlify
Copy link

netlify bot commented Dec 12, 2022

Deploy Preview for docs-rometools ready!

Name Link
🔨 Latest commit 532714f
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/639ae33bc450cf00086b4123
😎 Deploy Preview https://deploy-preview-4040--docs-rometools.netlify.app/playground
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.


#[derive(Debug, Clone, Default)]
pub(crate) struct FormatJsonMember;

impl FormatNodeRule<JsonMember> for FormatJsonMember {
fn fmt_fields(&self, node: &JsonMember, f: &mut JsonFormatter) -> FormatResult<()> {
format_verbatim_node(node.syntax()).fmt(f)
let content = format_with(move |f| {
Copy link
Contributor Author

@denbezrukov denbezrukov Dec 12, 2022

Choose a reason for hiding this comment

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

@MichaReiser MichaReiser added A-Formatter Area: formatter L-JSON Language: JSON labels Dec 12, 2022
@MichaReiser MichaReiser added this to the Next milestone Dec 12, 2022
@denbezrukov denbezrukov requested a review from a team as a code owner December 12, 2022 16:46
@denbezrukov denbezrukov requested a review from leops as a code owner December 12, 2022 17:01
@MichaReiser MichaReiser merged commit 1aee087 into rome:main Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter L-JSON Language: JSON
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

JSON Formatting
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载