Lua: quarto.json.encode should be ok with Pandoc inlines

Open
#13,520 0 comments 1 reaction 1 assignee View on GitHub

@cscheid is already working on this.

Since Oct 8, 2025.

Assessment

This issue has not been assessed yet.

Description

enhancement lua

If you have a bit of metadata in your document that you need to encode as JSON, a natural way to do it would be

local value = quarto.metadata.get(key)
local json_str = quarto.json.encode(value)

This doesn't work because quarto.json.encode expects plain Lua data, and Pandoc metadata has converted text values to inlines. We should make sure this works.

Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.