MCPcopy Index your code
hub / github.com/atomicdata-dev/atomic-data-browser / parseJsonADArray

Function parseJsonADArray

lib/src/parse.ts:104–118  ·  view source on GitHub ↗
(jsonArray: any[])

Source from the content-addressed store, hash-verified

102
103/** Parsees a JSON-AD array string, returns array of Resources */
104export function parseJsonADArray(jsonArray: any[]): Resource[] {
105 const resources: Resource[] = [];
106 try {
107 // const jsonArray = JSON.parse(string);
108 for (const jsonObject of jsonArray) {
109 const resource = new Resource(unknownSubject);
110 parseJsonADResource(jsonObject, resource);
111 resources.push(resource);
112 }
113 } catch (e) {
114 e.message = 'Failed parsing JSON ' + e.message;
115 throw e;
116 }
117 return resources;
118}

Callers 1

uploadFilesFunction · 0.90

Calls 1

parseJsonADResourceFunction · 0.85

Tested by

no test coverage detected