Skip to content

Cannot encode records #5

@xilopaint

Description

@xilopaint

Hi! I've tried to encode a list of records with no success.

set theList to {{title:"Inbox", subtitle:"", arg:"TMInboxListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/inbox.png"}}, {title:"Today", subtitle:"", arg:"TMTodayListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/today.png"}}, {title:"Anytime", subtitle:"", arg:"TMNextListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/anytime.png"}}, {title:"Upcoming", subtitle:"", arg:"TMCalendarListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/upcoming.png"}}, {title:"Someday", subtitle:"", arg:"TMSomedayListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/someday.png"}}, {title:"Logbook", subtitle:"", arg:"TMLogbookListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/logbook.png"}}, {title:"Trash", subtitle:"", arg:"TMTrashListSource", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/trash.png"}}, {title:"Developer", subtitle:"", arg:"THMAreaParentSource/955A4895-4D4E-49F1-B3F1-71DD14DA476E", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/area.png"}}, {title:"Home", subtitle:"", arg:"THMAreaParentSource/AABB0E7D-8C64-4799-85B4-59BFC7F434CB", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/area.png"}}, {title:"Office", subtitle:"", arg:"THMAreaParentSource/C914913E-F7F9-4D71-99B3-7A6ACA5200FA", valid:true, autocomplete:"", type:"", icon:{|path|:"icons/area.png"}}}
set json to encode(theList)

I'm getting the following error:

Code 1: 0:61: execution error: Unknown type record (-2700)

Reviewing the code of applescript-json I found out that records are not supported.

Any chance to support it in the near future?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions