Parsing of public addressing for remote events is not JSON-LD aware.
Both definitions of the function get_visibility
don't accept neither as:Public
or Public
which is correctly compacted JSON. See the elucidation at https://www.w3.org/TR/activitypub/#public-addressing.