Written by Andrew Sachen (2018-2024)
Share and Enjoy (Public Domain)
The JSON Playlist file format is designed to be dynamic but restrictive. UTF-8 is encouraged, I guess. Its major advantage over M3U and PLS file formats is the idea of contiguous files. It also benefits from the ability to include multiple attributes, including proprietary ones. And it's JSON, so it's simple.
*.jop, *.jopl, *.jop8
- *.jop should not cointain whitespace, but it can if it wants to.
- *.jop8 must be in UTF-8. *.jop and *.jopl can be in UTF-8 if they want to be, too.
- Element properties are all strings. Even numbers are strings. Especially numbers.
Title
,Time
andTracks
must all be present in the Root object.Time
elements should be delimited asDD:HH:MM:SS.TTT
or less.- Colons must delimit days, hours, minutes, and seconds. Milliseconds must be separated by a period.
- At least one
S
must always be present, even if it's just a0
."0"
means unknown.
- If one
T
is present,T00
must be present.0.1
must be written"0.100"
.
- If one
M
is present,0S
must be present, and so forth up to0H
forD
."1:05:02"
is the shortest way of expressing one hour, five minutes, and two seconds.
"1:00:00:00.000"
is exactly 86,400,000 milliseconds.- Values must never be negative under any circumstances.
- I've tried to include all relevant possible examples in the definition.
Tracks
is an array of "Track" objects. (The name "Track" is not used in the definition)- If a Track is an array instead of an object, the array is of Track objects.
- Track arrays must not be shuffled if the Playlist is shuffled. They are to be considered contiguous at all relevant times.
- NOTE: Contiguous does not mean merged. They are separate files that will always be played in the order listed.
- Track objects must contain a
Path
element at least. They should also contain aTitle
andTime
element. - The
Path
element should be a valid local file system path or a remote location over HTTP, HTTPS, or FTP.- The
Path
element may also be over any other protocol, standardized, custom, or otherwise.- Unsupported protocols should be passively remarked upon when the Playlist is loaded by a program, and their associated Track skipped.
- The
- If a Track is an array instead of an object, the array is of Track objects.
Shuffle
is an optional directive to describe the Playlist's intended order. Valid possibilities are:"always"
means the order in the Playlist is arbitrary. Shuffling the Playlist by default is recommended.- Example: A singles collection or a custom Playlist.
"yes"
means the order in the Playlist may have meaning, but is not vital. (Default)- Example: A normal album or discorgaphy by most musicians.
"no"
means the order in the Playlist is important to the content. Shuffling may be discouraged.- Example: A concept album, classical piece with independent movements, or TV serialization.
"never"
means the order of the Playlist is vital. Shuffling should be disabled, if possible.- Example: An audiobook split into chapters or a TV miniseries.
Repeat
is an optional directive to make the Playlist play on a loop. Valid possibilities are:"always"
means the Playlist should never stop when it reaches the final Track object, if supported. This may mean returning to the beginning of the first Track object, or selecting another Track objectaccording to a shuffling algorithm.- Example: An album or series that has a cyclical nature or plot, in which the end directly references the beginning.
"yes"
means the Playlist is assembled with the intention to be looped or to play more than once through.- Example: A collection for use as background music to continue for an undetermined period of time.
"no"
means that the Playlist could be looped at the user's choice, but that repeat listenings are not intended. (Default)- Example: Any typical Playlist.
"never"
means that the Playlist should always stop after the final Track object.- Example: Any standard narrative, such as an audiobook or plot-linked video collection.
- Additional proprietary elements may be included in the Root or in a Track object.
- They should not be read by software except when specifically required for proprietary reasons.
- Consider all unlisted elements as Comments.
- Such elements could, for example, include:
Year
in a Track object.Artist
orAlbum
in the Root object for specific albums or artist favorites.Artwork
in the Root or a Track object. May either be in the format ofPath
or as a base64 encoded string. Should be JPG or PNG.Modified
in the Root object to say when the Playlist was last changed.
- These elements are not endorsed by the definition, they are merely examples.