Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for GetSerializer (0.12 sec)

  1. schema/serializer.go

    // RegisterSerializer register serializer
    func RegisterSerializer(name string, serializer SerializerInterface) {
    	serializerMap.Store(strings.ToLower(name), serializer)
    }
    
    // GetSerializer get serializer
    func GetSerializer(name string) (serializer SerializerInterface, ok bool) {
    	v, ok := serializerMap.Load(strings.ToLower(name))
    	if ok {
    		serializer, ok = v.(SerializerInterface)
    	}
    	return serializer, ok
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jun 20 08:45:38 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. schema/field.go

    	} else {
    		serializerName := field.TagSettings["JSON"]
    		if serializerName == "" {
    			serializerName = field.TagSettings["SERIALIZER"]
    		}
    		if serializerName != "" {
    			if serializer, ok := GetSerializer(serializerName); ok {
    				// Set default data type to string for serializer
    				field.DataType = String
    				field.Serializer = serializer
    			} else {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
Back to top