For reasons too boring to go into here, I've written a small JSON library to add to the pile of them available for Swift. The interface of this library is inspired by, and similar to, that of SwiftyJSON, but the implementation is very different. Both SwiftyJSON and my library use the MIT license. I have copied no actual code from SwiftyJSON. (In fact, I deliberately did not look at SwiftyJSON's source until my implementation was finished. When I did, I saw how dissimilar they were.)


  1. Do I need to credit Ruoyu Fu? (I may do so anyway, even if the answer to this is 'no'.)
  2. If I do credit Ruoyu Fu, how do I do so, while making it plain that I am (by far) the primary author of this software?

It seems to me that there are two ways to do this. The first is informal credit, where somewhere in my project I say, "The interface of this software was inspired by Ruoyu Fu's SwiftyJSON." The second is to alter my license and license headers to say:

Copyright (c) 2016 Gregory Higley, Ruoyu Fu

(I think this gives a bit too much credit to Ruoyu Fu, but it's not a big deal to me if this is how it's usually done.) Or…

Copyright (c) 2016 Gregory Higley, Portions Copyright (c) 2014 Ruoyu Fu

Is there any general consensus on how to do this?


I should make something clear. I realize that "inspiration" does not need a licensing credit, but perhaps something like this does:

var json = try JSON(data: data)
json["x"].string = "foo"
json["y"].int = 37
let data = json.rawData()

This code loads some JSON from NSData, proceeds to alter it, and then turns in back into NSData. This happens to be from my library, but for a few trivial differences it could be from SwiftyJSON. As I said, the interface of my library and that of SwiftyJSON are about as different as American English and British English, but under the hood they are very different.

If I borrow the interface of another library, but not the implementation, what are the licensing requirements?

  • 8
    Nope. "Inspiration" is not the sort of thing licenses cover. All I can say is that to me it seems polite to credit him in your readme but overkill to mention him in every single header file, unless you're actually using his code. But there are no rules or standards or legal obligations on which we could base a real answer.
    – Ixrec
    Mar 13 '16 at 21:10
  • What I figured. Mar 13 '16 at 21:11
  • Personally, I wouldn't feel right if someone listed me as copyright holder in a work that I didn't participate in (directly by writing some new code or indirectly by having my code from another project reused in some way), as appears the case here. I would be fine with an honorable mention for inspiration sans copyright in a read-me.
    – Erik Eidt
    Mar 14 '16 at 0:14
  • 2
  • Thanks, Josh. That was very helpful. I think my situation is close to that one, though I actually started with a clean slate rather than a clone. Mar 14 '16 at 22:40

The copyright statements (the "Copyright ") should only mention the people that actually provided code to the file/project.
People that didn't contribute any actual code but only provided inspiration don't have any legal claim to copyright and thus shouldn't be mentioned in the copyright statements.

For copyright purposes, it doesn't matter that the interfaces are very similar. All the 'hello world' programs ever written are also very similar (especially if you compare two of them that are written in the same language), but each author still has sole copyright over his version.

As a courtesy, you can state in your documentation that your project or its interface was inspired by another project.
If you create your library as a (near) drop-in replacement of another library, then it is common to highlight that, because it will help your users in understanding how to use your library.

  • I've accepted your answer, but you might want to look at the "Update" I added to my question. Mar 14 '16 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.