MCPcopy Index your code
hub / github.com/dataease/SQLBot / parseJsonObjectOrArray

Function parseJsonObjectOrArray

frontend/public/swagger-ui-bundle.js:56161–56173  ·  view source on GitHub ↗
({ value: s, silentFail: o = !1 })

Source from the content-addressed store, hash-verified

56159 }
56160 }
56161 },
56162 parseJsonObjectOrArray = ({ value: s, silentFail: o = !1 }) => {
56163 try {
56164 const i = JSON.parse(s)
56165 if (fu(i) || Array.isArray(i)) return i
56166 if (!o) throw new Error('Expected JSON serialized object or array')
56167 } catch {
56168 if (!o)
56169 throw new Error(
56170 'Could not parse parameter value string as JSON Object or JSON Array'
56171 )
56172 }
56173 return s
56174 },
56175 parseURIReference = (s) => {
56176 try {

Callers 1

execute_buildRequestFunction · 0.85

Calls 3

fuFunction · 0.85
parseMethod · 0.45
isArrayMethod · 0.45

Tested by

no test coverage detected