github.com/weaviate/weaviate@v1.24.6/test/acceptance/graphql_resolvers/json_helper.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package test 13 14 import ( 15 "encoding/json" 16 ) 17 18 func parseJSONSlice(text string) []interface{} { 19 var result []interface{} 20 err := json.Unmarshal([]byte(text), &result) 21 if err != nil { 22 panic(err) 23 } 24 25 return result 26 }