the-rocci-project/rOCCI-core

View on GitHub
examples/parse_model_json.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'occi/infrastructure'

Yell.new '/dev/null', name: Object

model = Occi::Infrastructure::Model.new

mf = File.read File.join(File.dirname(__FILE__), 'rendering', 'model.json')
Occi::Core::Parsers::JsonParser.model(mf, {}, 'application/json', model)
model.valid!