Most likely you forgot about importing CommonModule
:
import { CommonModule } from '@angular/common';
@NgModule({
...
imports: [ CommonModule ]
...
})
As noted in the comments, do this in the module where you’re using the json
pipe.