MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_array_of_objects

Function parse_array_of_objects

nodedb-sql/src/parser/object_literal.rs:470–477  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

468
469 #[test]
470 fn parse_array_of_objects() {
471 let result = parse_object_literal_array("[{ name: 'Alice' }, { name: 'Bob' }]")
472 .unwrap()
473 .unwrap();
474 assert_eq!(result.len(), 2);
475 assert_eq!(result[0]["name"], Value::String("Alice".to_string()));
476 assert_eq!(result[1]["name"], Value::String("Bob".to_string()));
477 }
478
479 #[test]
480 fn parse_array_empty() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected