mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 16:30:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			224 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			224 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package utils
 | 
						|
 | 
						|
import (
 | 
						|
	"encoding/json"
 | 
						|
)
 | 
						|
 | 
						|
func Json2Map(jsonStr string) map[string]interface{} {
 | 
						|
	var res map[string]interface{}
 | 
						|
	if jsonStr == "" {
 | 
						|
		return res
 | 
						|
	}
 | 
						|
	_ = json.Unmarshal([]byte(jsonStr), &res)
 | 
						|
	return res
 | 
						|
}
 |