You gave two different things you want to accomplish:
1. “I am trying to read those values and store in DB”
2. “I will populate the struct and provide it the application for
consumption”
Fortunately accomplishing either or both of these goals follows a similar
process.
Start by figuring out wh
Clean-up
example: https://github.com/clbanning/mxj/blob/master/examples/leafnodes.go
On Wednesday, February 22, 2017 at 4:31:47 AM UTC-7, C Banning wrote:
>
> Perhaps not very elegant but seems to produce what you're looking for:
> https://play.golang.org/p/bpM69Q-ddV
>
--
You received this m
Perhaps not very elegant but seems to produce what you're looking for:
https://play.golang.org/p/bpM69Q-ddV
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to gola
Hi,
Thanks for the response.
Below is the sample json being used,
{
"jsondata": [
{
"dataReference":[
{
"parameterType" : "common",
"applicationtype":
{
"application1":
{
"applicationName": "appl1",
"param1":
Could you give an example of the json you are starting from?
Also, what database are you using?
On Sunday, February 19, 2017 at 8:27:32 AM UTC+1, Bharath B wrote:
>
> Hi,
>
> I am trying to read those values and store in DB.
>
> Regards,
> Bharath B
>
--
You received this message because you ar
Hi,
I am trying to read those values and store in DB.
Regards,
Bharath B
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.co
It sounds to me like the encoding/json package in the standard library
might do what you want.
On 18 Feb 2017 15:04, wrote:
> Hi,
>
> I am learning Go language and also to technical terms like in subject
> "struct member path" (don't know if right).
>
> I need help to initialize a nested structu
Why do you want to to this? What are you actually trying to accomplish? See
http://xyproblem.info/
On Sat, Feb 18, 2017 at 7:04 AM wrote:
> Hi,
>
> I am learning Go language and also to technical terms like in subject
> "struct member path" (don't know if right).
>
> I need help to initialize a
Hi,
I am learning Go language and also to technical terms like in subject
"struct member path" (don't know if right).
I need help to initialize a nested structure like below, by getting the
struct member names at runtime.
type jsonData struct {
DataReference []struct {
ParameterTyp