core: add replacer and indent keyword parameters to as-json