Actually the current implementation is confusing. We should use -filename-format in these cases. (The special format {layer} and {frame} where added in a later stage to -save-as parameter, so -filename-format is the one that should works.) For example:
Anyway I’ll take note to fix this in a future release because it should work directly from -save-as (the -filename-format makes more sense to complete the filename of the JSON -data output than for -save-as).