Skip to content
Library for parsing Marco (Marta Configuration) format
Swift Other
  1. Swift 99.8%
  2. Other 0.2%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
marco-cli Initial commit Jan 20, 2019
marco.xcodeproj Migrate Marco to Swift 5 Oct 14, 2019
marco Fix hex literal parsing Oct 25, 2019
marcoTests Fix hex literal parsing Oct 25, 2019
.gitignore Add API documentation (jazzy) Jan 20, 2019
LICENSE Initial commit Jan 20, 2019
README.md Add info about Carthage Jan 20, 2019
jazzy.bash Add API documentation (jazzy) Jan 20, 2019
jazzy.json Improve the documentation Jan 20, 2019

README.md

MarcoKit: Marco parsing library for Swift

This is a Swift library for working with Marco configuration/value files.
Also, this is a reference implementation of the Marco parser.

What is Marco?

Marco is a new configuration and data serialization format. You can read more about it here.

Library features

MarcoKit allows you to:

  • Parse Marco value/configuration files;
  • Modify and serialize documents back to String (formatting is preserved);
  • Create new Marco documents;
  • Minify or prettify Marco documents;
  • Convert Marco to Objective-C representation of JSON and vice-versa.

Carthage

MarcoKit can be imported as a Carthage dependency:

github "marta-file-manager/MarcoKit" "v0.1"

Documentation

The API reference is available here.

Performance

While Marco syntax as easy to parse as JSON, MarcoKit backs Marco values with AST elements. This allows you to modify the document contents without losing the formatting and to implement code insight features. However, this comes as a cost of performance.

I didn't do any serious performance comparison with other serialization libraries, but the testing shows that using MarcoKit may not be the best idea if you have huge data chunks. However, the difference is unnoticeable for common configuration file use-cases.

Contributing

MarcoKit is available under the Apache 2.0 License.

If you send a Pull Request, please ensure that all existing tests are passing ("All Tests" scheme, Product → Test).
If you fixed a bug, add the new test or modify the existing one to check the new behavior.
If you plan to change the Marco format, consider making an issue describing your problem and a proposed solution.

You can’t perform that action at this time.