Skip to content

Terminating JSON files with newlines #109

@maroneze

Description

@maroneze

In a few situations, such as for version control with strict checking, having JSON files with no newlines at the end of the file can be bothersome, and is apparently un-POSIX (people have reported similar issues in other tools: decaporg/decap-cms#1382, serverless/serverless#1321)

I wonder if you have already considered the possibility of adding a newline when printing JSON objects to files, e.g. via Yojson.to_file, or if there are specific reasons not to do it, and that it should be done by the yojson user via other functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions