mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Nested Mapping #255
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jjuliano on GitHub (Nov 28, 2024).
I want to define a nested mapping
nestedRecordwith the following structure:Stringkeys (e.g.,record1,record2), each representing a record.Stringattribute names (e.g.,attrib1,attrib2,attrib3) to theirStringvalues.For example:
With this,
nestedRecordmight look like:I encountered an error while attempting to define a nested mapping:
Does pkl support nested mappings i.e.
Mapping<String, Mapping<String, String>>? If so, how should I define this structure correctly?@odenix commented on GitHub (Nov 28, 2024):
It does, and your syntax looks correct to me. I might be able to help if you posted a reproducer.
@jjuliano commented on GitHub (Nov 29, 2024):
sorry, I made a syntax error, it does work. I have the attributes directly on the nestedRecord. We can close this now.