Wednesday, March 29, 2023

How To Read The Values From Empty Interface Used During The JSON.Unmarshal in Go Language

When we don't know the type of the json structure or it's in dynamic nature usually we will use empty interfaces to handle these types.

Whenever you want to read values using the key from this empty interface ideally we need to convert this interface to map type interface using the type conversion.

Once it's converted to map we can use the map["keyname"] format to get the corresponding value from the json. 


Please comment or write us if you have any queries/requirements.

Please like,follow,bookmark,subscribe this site to receive daily updates.


FaceBook Page - I Love Coding. You?


Hope this helps you..Enjoy..!

No comments:

Post a Comment