Files
dc/client/src/app/pipes/prettyjson.pipe.ts
T

12 lines
247 B
TypeScript

import { Pipe, PipeTransform } from '@angular/core'
@Pipe({
name: 'prettyjson',
standalone: false
})
export class PrettyjsonPipe implements PipeTransform {
transform(rawJson: any): string {
return JSON.stringify(rawJson, null, 2)
}
}