Giter VIP home page Giter VIP logo

dson's Introduction

Doge Serialized Object Notation

Specification files and website

Abstract

Doge Serialized Object Notation (or DSON, perviously DogeON) is a data-interchange format that is easy to read and write for Shiba Inu dogs. It strives to replace JSON and XML as the major players in terms of intercommunication between a wide range of services for Shiba Inus and other doge breeds alike. To make this goal possible and push on this idea, the DSON language is specified in these files, which are hosted on the following official website as well for everydoge to read and use: https://dogeon.xyz/

Implementations

There are already a wide variety of parsers and serializers available for this very new language, with the most sophisticated of them being DSON.djs, a DSON library written in DogeScript by its very author. It is most likely going to be implemented in the standard library of DogeScript 3 and is to be treated as the reference implementation.

If you want to write your own implementation and see it added to these files and the website, please create a new issue on GitHub and I'll gladly do so!

Localization

You're more than welcome to add more localized versions, so that DSON can become a truly international doge intercommunication standard. If you want to localize the website, please fork the official repository, copy the index.html and create a pull request once you've implemented your version. Please keep in mind to leave the keywords and everything language-related in tact! Do only change the explanatory part of the website. Have a look at the index-si.html file as a reference.

Share the love!

Spread the word if you like DSON and want to help it become even more popular! Write and blog about it, tell your friends and your grandma!

And remember: always be a caring and kind shibe!

dson's People

Contributors

anemortalkid avatar benatkin avatar bhaeussermann avatar cerlestes avatar clrnd avatar frozencemetery avatar lcycon avatar muhammadmuzzammil1998 avatar vpzomtrrfrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dson's Issues

exp base is ambiguous

The spec suggests that the exponents are base 8, as are all other numbers in dson, but the example given of 42very3 -> 24e3 suggests that exponents are base 10 rather than being base 8 in which case the example should be 42very3 -> 17408 and most of the standard-compliant implementations are wrong including mine.

In a base 8 exponent, the base should be multiplied by 8 to the power N for N being a base 8 number, whereas the given example shows that while N may be read in base 8, the exponent part is not in base 8 but is in base 10, that is the expression is M_10^N rather than M_8^N.

dsonlint

Hey, I made this a long time ago and forgot about it http://dsonlint.github.io/. Not sure if anyone else has done one. Might be cool to link it from the main pages, as I think it's a cool way to show off the spec.

dson.go: A DSON converter and serializer in Go

dson.png

Build Status CodeFactor Go Report Card Codacy Badge Maintainability Test Coverage GitHub license Twitter

Hi,
I wrote a new implementation for DSON standard in Go programming language. It's easy to use and implement in a project.

Kindly review https://github.com/muhammadmuzzammil1998/dsongo and add it to the list of libraries of DSON on the website.

dson.go can:

  • Encode from JSON to DSON
  • Decode from DSON to JSON
  • Validate DSON
  • Marshal a Go structure to DSON
  • Unmarshal DSON to a Go structure

Examples


Install dson.go first

$ go get muzzammil.xyz/dsongo

Common imports

import (
    "fmt"

    "muzzammil.xyz/dsongo"
)

Encoding JSON into DSON

func main() {
    d := dson.Encode(`{"foo":"bar"}`)
    fmt.Println(d) // such "foo" is "bar" wow
}

Decoding DSON into JSON

func main() {
    j := dson.Decode(`such "foo" is "bar" wow`)
    fmt.Println(j) // {"foo":"bar"}
}

Validating DSON

func main() {
    if dson.Valid(`such "foo" is "bar" wow`) {
        fmt.Println("Valid DSON")
    } else {
        fmt.Println("Invalid DSON")
    }
}

Marshaling DSON

func main() {
    type ColorGroup struct {
        ID     int
        Name   string
        Colors []string
    }
    RedGroup := ColorGroup{
        ID:     1,
        Name:   "Reds",
        Colors: []string{"Crimson", "Red", "Ruby", "Maroon"},
    }
    r, err := dson.Marshal(RedGroup)
    if err == nil && dson.Valid(r) {
        fmt.Println(r) // such "ID" is 1! "Name" is "Reds". "Colors" is so "Crimson" and "Red" and "Ruby" also "Maroon" many wow
    }
}

Unmarshaling DSON

func main() {
    d := `so such "Name" is "Platypus" and "Order" is "Monotremata" wow and such "Name" is "Quoll" and "Order" is "Dasyuromorphia" wow many`
    if !dson.Valid(d) {
        fmt.Println("DSON is not valid")
        return
    }
    type Animal struct {
        Name  string
        Order string
    }
    var animals []Animal
    err := dson.Unmarshal(d, &animals)
    if err == nil {
        fmt.Printf("%+v", animals) // [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}]
    }
}

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.