PetaTookmyKFC / Prehnite_DataTypes

GNU General Public License v3.0
0 stars 0 forks source link

Structs / Maps don't handle array #1

Open PetaTookmyKFC opened 1 week ago

PetaTookmyKFC commented 1 week ago

Arrays and maps cannot be encoded within structs, but other structs can as long as they are singular.

Encodes fine

type Name struct {
 First string
 Last string
}
type User struct {
 id string
 Name name
 Age int 
}

Fails to encode -- Error Type Not Supported

type Name struct {
 First string
 Last string
}

type User struct {
 id string
 Name name
 Age int
 Friends []string
}
PetaTookmyKFC commented 1 week ago

Na bro... That seems hard