mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			269 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			269 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package jsoniter
 | |
| 
 | |
| import "encoding/json"
 | |
| 
 | |
| type Number string
 | |
| 
 | |
| func CastJsonNumber(val interface{}) (string, bool) {
 | |
| 	switch typedVal := val.(type) {
 | |
| 	case json.Number:
 | |
| 		return string(typedVal), true
 | |
| 	case Number:
 | |
| 		return string(typedVal), true
 | |
| 	}
 | |
| 	return "", false
 | |
| }
 | 
