Normally you are either drawing a Class diagram, or you are drawing a Deployment diagram - each diagram has its own syntax and list of keywords. And it won't let you mix the two ... without using 'allowmixing'!
The "Interface" keyword is interesting because it is the only? keyword that exists in both Class diagrams and Deployment diagrams but for completely different uses. So if you have turned on 'allowmixing' then Plantuml can't know which you want, and defaults to the class diagram version. JSON also exists in both diagrams, but has the same syntax and look in both diagram types, so it doesn't matter which it uses during 'allowmixing' - in your example the JSON object is irrelevant, the allowmixing has been added to be able to have the deployment-component and the class-interface coexisting together.
I'm not sure if there's a sensible way to include the deployment diagram's Interface instead of the class diagram one. But you force it if you can find a syntax difference between the two diagrams to exploit, for example:
@startuml
allowmixing
component C
interface i [
i]
@enduml
Which exploits the fact that the deployment diagram's Interface allows a description in square brackets, but the class Interface doesn't recognise that syntax - so the ambiguity is resolved.
Best manual reference explaining is:
8.18 Mixing Deployment (Usecase, Component, Deployment) element within a Class or Object diagram
In order to add a Deployment element or a State element within a Class or Object diagram, you can use the allowmixing or allow_mixing directive.