<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>json on Golang</title><link>https://golang.k5kc.com/tags/json/</link><description>Recent content in json on Golang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 16 Aug 2020 00:10:00 +0530</lastBuildDate><atom:link href="https://golang.k5kc.com/tags/json/index.xml" rel="self" type="application/rss+xml"/><item><title>Go - Processing JSON object</title><link>https://golang.k5kc.com/2020/08/16/processing-json-object/</link><pubDate>Sun, 16 Aug 2020 00:10:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/processing-json-object/</guid><description>JSON is a commonly used and powerful data-interchange format, and Go provides a built-in json package to handle it. Let&amp;rsquo; see the following example:
package main import ( &amp;#34;encoding/json&amp;#34; &amp;#34;log&amp;#34; &amp;#34;fmt&amp;#34; ) type People struct { Name string age int Career string `json:&amp;#34;career&amp;#34;` Married bool `json:&amp;#34;,omitempty&amp;#34;` } func main() { p := &amp;amp;People{ Name: &amp;#34;Nan&amp;#34;, age: 34, Career: &amp;#34;Engineer&amp;#34;, } data, err := json.Marshal(p) if err != nil { log.Fatalf(&amp;#34;JSON marshaling failed: %s&amp;#34;, err) } fmt.</description></item></channel></rss>