You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rewrite_json.rs
    path of file: ./repos/turbo/crates/turborepo-lib/src
    
    the code of the file until where you have to start completion: use jsonc_parser::{errors::ParseError, parse_to_ast};
use thiserror::Error;

#[derive(Error, Debug)]
pub enum RewriteError {
    #[error("The JSON document failed to parse. {0}")]
    ParseError(ParseError),
    #[error("The JSON do
    
fn get_root(json_document_string: &str) -> Result<jsonc_parser::ast::Value, RewriteError> {
    let parse_result_result = parse_to_ast(
        json_document_string,
        &Default::default(),
        &Default::default(),
    );

    match parse_result_result {
        Ok(parse_result) => match parse_result.value {
            Some(root) => Ok(root),
            None => Err(RewriteError::NoRoot),
        },
        Err(parse_error) => Err(RewriteError::ParseError(parse_error)),
    }
}