This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.util.DynamicVariable | |
| /** | |
| * A concise JSON DSL in Scala. | |
| * When you want to use, only | |
| * import Jsson._ is needed. | |
| * Note that this program change the semantics of standard -> operator. | |
| * I recommend that you use enclosing block with Jsson as followings: | |
| * { | |
| * import Jsson._ | |
| * val obj = %{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mongoose = require("mongoose"); | |
| var Schema = mongoose.Schema; | |
| mongoose.connect("127.0.0.1", "mongoose_dbref", 27017); | |
| var PersonSchema = new Schema({ | |
| name : String | |
| , age : Number | |
| , stories : [{ type: Schema.ObjectId, ref: 'Story' }] | |
| }); | |
| var StorySchema = new Schema({ |
NewerOlder