pub fn core_to_json(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 1 {
            print_error(chunk, i, "to-json requires one argument");
            return 0;
        }

        let value_rr = self.stack.pop().unwrap();
        let value_rrb = value_rr.borrow();
        self.stack.push(Rc::new(RefCell::new(Value::String(
            convert_to_json(&value_rrb),
            None,
        ))));

        return 1;
    }
/// Takes a hash, converts it into a JSON string representation,
/// and puts the result onto the stack.
Takes a hash, converts it into a JSON string representation,
and puts the result onto the stack.
Takes a hash converts it into a JSON string representation and puts the result onto the stack .
pub fn core_to_json(&mut self, chunk: &Chunk, i: usize) -> i32 {
        if self.stack.len() < 1 {
            print_error(chunk, i, "to-json requires one argument");
            return 0;
        }
        let value_rr = self.stack.pop().unwrap();
        let value_rrb = value_rr.borrow();
        self.stack.push(Rc::new(RefCell::new(Value::String(
            convert_to_json(&value_rrb),
            None,
        ))));
        return 1;
    }
pub fn core_to_json ( & mut self , chunk : & Chunk , i : usize ) -> i32 { if self . stack . len ( ) < 1 { print_error ( chunk , i , " " ) ; return 0 ; } let value_rr = self . stack . pop ( ) . unwrap ( ) ; let value_rrb = value_rr . borrow ( ) ; self . stack . push ( Rc :: new ( RefCell :: new ( Value :: String ( convert_to_json ( & value_rrb ) , None , ) ) ) ) ; return 1 ; }
Takes a hash, converts it into a JSON string representation,
and puts the result onto the stack.
Takes a hash converts it into a JSON string representation and puts the result onto the stack .
&mut self
chunk
&Chunk
i
usize