derive encoder/decoder from std json encoder/decoder ?

54 views
Skip to first unread message

christoph...@gmail.com

unread,
Jul 8, 2021, 8:30:27 AM7/8/21
to golang-nuts

I need to write a binary encoder/decoder very similar to the std JSON encoder/decoder.
I would like to reuse 80% of the JSON encoder/decoder code and adapt it to support my binary encoding. 

Is this allowed and at which condition ?

Would it be possible to publish my code on github with an MIT license instead of the BSD license ? This is just because all my projects are all using the MIT license.

Jan Mercl

unread,
Jul 8, 2021, 8:40:16 AM7/8/21
to christoph...@gmail.com, golang-nuts
On Thu, Jul 8, 2021 at 2:30 PM christoph...@gmail.com
<christoph...@gmail.com> wrote:

> I need to write a binary encoder/decoder very similar to the std JSON encoder/decoder.
> I would like to reuse 80% of the JSON encoder/decoder code and adapt it to support my binary encoding.
>
> Is this allowed and at which condition ?

I'm _not_ a lawyer: Yes, it is allowed, conditions can be see here:
https://github.com/golang/go/blob/2ca44fe2213b53ccaf6f555c11858c6e36490624/LICENSE#L3


> Would it be possible to publish my code on github with an MIT license instead of the BSD license ? This is just because all my projects are all using the MIT license.

I'm _not_ a lawyer: AFAIK, not without having a permission to
relicense. The reason is that going from BSD to MIT is not really
compatible: https://softwareengineering.stackexchange.com/a/122008
Reply all
Reply to author
Forward
0 new messages