@@ -62,7 +62,7 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
62
62
else if ( sliceType != thisType )
63
63
{
64
64
sliceType = mostSpecificPossibleGoType ( thisType , sliceType ) ;
65
- if ( sliceType == "interface{} " )
65
+ if ( sliceType == "any " )
66
66
break ;
67
67
}
68
68
}
@@ -130,9 +130,9 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
130
130
}
131
131
else {
132
132
if ( flatten && depth >= 2 ) {
133
- appender ( sliceType || "interface{} " ) ;
133
+ appender ( sliceType || "any " ) ;
134
134
} else {
135
- append ( sliceType || "interface{} " ) ;
135
+ append ( sliceType || "any " ) ;
136
136
}
137
137
}
138
138
}
@@ -316,7 +316,7 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
316
316
function goType ( val )
317
317
{
318
318
if ( val === null )
319
- return "interface{} " ;
319
+ return "any " ;
320
320
321
321
switch ( typeof val )
322
322
{
@@ -342,7 +342,7 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
342
342
return "slice" ;
343
343
return "struct" ;
344
344
default :
345
- return "interface{} " ;
345
+ return "any " ;
346
346
}
347
347
}
348
348
@@ -356,7 +356,7 @@ function jsonToGo(json, typename, flatten = true, example = false, allOmitempty
356
356
&& typ2 . substr ( 0 , 5 ) == "float" )
357
357
return typ2 ;
358
358
else
359
- return "interface{} " ;
359
+ return "any " ;
360
360
}
361
361
362
362
// Proper cases a string according to Go conventions
0 commit comments