github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/json/errors.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package json 4 5 import ( 6 er "../error" 7 "../protocol" 8 ) 9 10 const domainEnglish = "JSON" 11 const domainPersian = "جیسون" 12 13 // Declare Errors Details 14 // TODO::: use json.ietf.org or ?? 15 var ( 16 ErrEncodedIncludeNotDeffiendKey = er.New("urn:giti:json.ecma-international.org:error:encoded-include-not-deffiend-key").SetDetail(protocol.LanguageEnglish, domainEnglish, "Encoded Include Not Deffiend Key", 17 "Given encoded json string include a key that must not be in the encoded string", 18 "", 19 "").Save() 20 21 ErrEncodedCorrupted = er.New("urn:giti:json.ecma-international.org:error:encoded-corrupted").SetDetail(protocol.LanguageEnglish, domainEnglish, "Encoded Corrupted", 22 "Given encoded json string corruputed and not encode in the way that can decode", 23 "", 24 "").Save() 25 26 ErrEncodedIntegerCorrupted = er.New("urn:giti:json.ecma-international.org:error:encoded-integer-corrupted").SetDetail(protocol.LanguageEnglish, domainEnglish, "Encoded Integer Corrupted", 27 "Given encoded json in Integer part corruputed and not encode in the way that can decode", 28 "", 29 "").Save() 30 31 ErrEncodedStringCorrupted = er.New("urn:giti:json.ecma-international.org:error:encoded-string-corrupted").SetDetail(protocol.LanguageEnglish, domainEnglish, "Encoded String Corrupted", 32 "Given encoded json in string part corruputed and not encode in the way that can decode", 33 "", 34 "").Save() 35 36 ErrEncodedArrayCorrupted = er.New("urn:giti:json.ecma-international.org:error:encoded-array-corrupted").SetDetail(protocol.LanguageEnglish, domainEnglish, "Encoded Array Corrupted", 37 "Given encoded json in array part corruputed and not encode in the way that can decode", 38 "", 39 "").Save() 40 41 ErrEncodedSliceCorrupted = er.New("urn:giti:json.ecma-international.org:error:encoded-slice-corrupted").SetDetail(protocol.LanguageEnglish, domainEnglish, "Encoded Slice Corrupted", 42 "Given encoded json in slice part corruputed and not encode in the way that can decode", 43 "", 44 "").Save() 45 )