json_validator 0.0.1 copy "json_validator: ^0.0.1" to clipboard
json_validator: ^0.0.1 copied to clipboard

outdatedDart 1 only

A Json validator. Will find and prune json structures according to a reference.

example/json_validator_example.dart

// Copyright (c) 2017, edouard. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:json_validator/json_validator.dart';

main() {
  var personMap = {"name":"sarah", "age":40, "hasLongHair":false};

  var personValidator = new JsonMapValidator("aName", [new JsonIntValidator("age"),
  new JsonStringValidator("name"),
  new JsonBoolValidator("hasLongHair")
  ]);

  var validatedPersonMap = personValidator.parse(personMap);
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Json validator. Will find and prune json structures according to a reference.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on json_validator