Aliases & Anchors - API example - Output

JSON [ { "content" : "comment 1", "date" : 1234567, "id" : 1, "user" : { "followers" : 99, "fullname" : "...", "id" : 1001, "nick" : "UserA", "repos" : 23 } }, { "content" : "comment 2", "date" : 1234567, "id" : 2, "user" : { "followers" : 99, "fullname" : "...", "id" : 1001, "nick" : "UserA", "repos" : 23 } } ]
YAML --- - content: comment 1 date: 1234567 id: 1 user: &1 # <---- Anchor with name '1' # points at the mapping right below followers: 99 fullname: '...' id: 1001 nick: UserA repos: 23 - content: comment 2 date: 1234567 id: 2 user: *1 # Alias (Reference) to anchor '1' # Loading back into Perl it will recreate # a structure with references
Slide 14/35 BACK UP NEXT next: ( space / -> / page up ) | previous: ( backspace / <- / page down ) | next page: ( shift + page down ) | previous page: ( shift + page up ) | index: ( arrow-up )