[In order to put my answer on an answer area]
Here is a possible answer:
@startuml
!$foo = { "name": "John", "age" : 30 }
rectangle Inner #tan as "
{{json
#highlight name
$foo
}}
"
@enduml
And see the expected result:
@PlantUML team: accept space before header command on JSON diagram...
Enjoy.
Regards.