[librecat-dev] Vacuum fix on keys?

Tobias Bülte tobias.buelte at hbz-nrw.de
Wed Sep 13 15:02:44 CEST 2023


Wouldn't remove_field("") do the trick?


Am 13.09.23 um 14:34 schrieb Peil, Vitali:
> Hi all,
>
> I came across some bad data ;-). Tried to fix this with the vacuum fix. The data I have includes empty field names which I want to clean.
>
> with the vacuum fix:
> $ echo '[{"ok": 1, "empty": "", "":"some bad data"}]' | catmandu convert to JSON --fix "vacuum()"
> Output: [{"":"some bad data","ok":1}]
>
> but I would expect as output
> [{"ok":1}]
>
> Is this a bug in the vacuum fix? Is there another way doing this?
>
> Best,
> Vitali
>
>
> _______________________________________________
> librecat-dev mailing list
> - send list mails to librecat-dev at lists.uni-bielefeld.de
> - to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
> - project website: http://librecat.org/


More information about the librecat-dev mailing list