Skip to content

add sanitization to to_json output#2287

Open
tomkralidis wants to merge 1 commit intomasterfrom
jinja-tojson
Open

add sanitization to to_json output#2287
tomkralidis wants to merge 1 commit intomasterfrom
jinja-tojson

Conversation

@tomkralidis
Copy link
Member

@tomkralidis tomkralidis commented Mar 14, 2026

Overview

This PR adds sanitization to pygeoapi.util.to_json.

Related Issue / discussion

Additional information

None

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@tomkralidis tomkralidis added the ui User interface label Mar 14, 2026
@tomkralidis tomkralidis requested a review from webb-ben March 14, 2026 23:56
@webb-ben
Copy link
Member

From what I recall, tojson might not be able to serialize a date time (as implemented in

def json_serial(obj: Any) -> str:
? Might be worth building some tests for HTML

@tomkralidis
Copy link
Member Author

Then will shift to to_json. Update coming with tests.

@tomkralidis tomkralidis changed the title use Jinja tojson in templates add sanitization to to_json output Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui User interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants