use crate::write::{LinkSink, Writer};
use vize_l0::{Span, ToCompactString};
pub(super) fn quoted<L: LinkSink>(writer: &mut Writer<L>, value: &str, span: Span) {
let quoted = serde_json::Value::from(value).to_compact_string();
writer.push_linked("ed, span);
}
pub(super) fn property<L: LinkSink>(writer: &mut Writer<L>, value: &str, span: Span) {
if value == "__proto__" {
writer.push("[");
}
quoted(writer, value, span);
if value == "__proto__" {
writer.push("]");
}
}