# Googlejson package

**URL:** <https://forum.golangbridge.org/t/googlejson-package/789>\
**Category:** Releases\
**Created:** [September 30, 2015, 10:14pm UTC](https://forum.golangbridge.org/t/googlejson-package/789 "2015-09-30T22:14:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonrichardsmith](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/jasonrichardsmith/32/364_2.png) [@jasonrichardsmith](https://forum.golangbridge.org/u/jasonrichardsmith)\
**Post date:** [September 30, 2015, 10:14pm UTC](https://forum.golangbridge.org/t/googlejson-package/789/1 "2015-09-30T22:14:44Z")

</div>

This package was just written to implement JSON according to the Google JSON style guide for a client via http.Response or a server using http.ResponseWriter.

Feedback appreciated.  
[https://godoc.org/github.com/jasonrichardsmith/googlejson](https://godoc.org/github.com/jasonrichardsmith/googlejson)

> **[GitHub - jasonrichardsmith/googlejson: A Package to easily create API...](https://github.com/jasonrichardsmith/googlejson)**
>
> A Package to easily create API responses according to Google JSON Style Guide - GitHub - jasonrichardsmith/googlejson: A Package to easily create API responses according to Google JSON Style Guide

Style Guide  
[https://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml](https://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml)

---

<div class="post-metadata">

**Author:** ![Giulio\_Iotti](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/giulio_iotti/32/937_2.png) [@Giulio\_Iotti](https://forum.golangbridge.org/u/Giulio_Iotti)\
**Post date:** [October 1, 2015, 7:41pm UTC](https://forum.golangbridge.org/t/googlejson-package/789/2 "2015-10-01T19:41:34Z")

</div>

I know this is just nit-picking, but you can create and return a struct by pointer inline:

```
return &Struct{a: value}

```

In AddField(), you can add directly the slice:

```
fs = append(fs, keys...)
```

---

<div class="post-metadata">

**Author:** ![jasonrichardsmith](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/jasonrichardsmith/32/364_2.png) [@jasonrichardsmith](https://forum.golangbridge.org/u/jasonrichardsmith)\
**Post date:** [October 1, 2015, 10:30pm UTC](https://forum.golangbridge.org/t/googlejson-package/789/3 "2015-10-01T22:30:50Z")

</div>

Yes, thank you, I am already making it variadic. Thank you for checking out it out though.

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [December 30, 2015, 10:30pm UTC](https://forum.golangbridge.org/t/googlejson-package/789/4 "2015-12-30T22:30:56Z")

</div>

Closed on December 30, 2015, 10:30pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
