开发者

Where should I publish my AS3 class?

I made a class that encodes an object in a format 20% smaller than json, and it's not binary. Now I would like to put it somewhere, so people can use it. Where should I post it?

Here's an example object, encoded in JSON:

{"glossary":{"GlossDiv":{"GlossList":{"GlossEntry":{"GlossTerm":"Standard Generalized Markup Language","Abbrev":"ISO 8879:1986","ID":"SGML","GlossDef":{"GlossSeeAlso":["GML","XML"],"para":"A meta-markup language, used to cre开发者_C百科ate markup languages such as DocBook."},"Acronym":"SGML","SortAs":"SGML","GlossSee":"markup"}},"title":"S"},"title":"example glossary"}}

And here it is in my format:

glossary{GlossDiv{GlossList{GlossEntry{GlossDef{GlossSeeAlso[GML XML]para"A meta-markup language, used to create markup languages such as DocBook."}GlossTerm"Standard Generalized Markup Language"GlossSee markup ID SGML Acronym SGML Abbrev"ISO 8879:1986"SortAs SGML}}title S}title"example glossary"}

In JSON, the string length is 360, and in my format it is 299

(As you see, my format only puts quotes around the identifier if it contains whitespaces or special characters, it can encode anything that JSON can)

Here's an example readable string:

JSON:

{
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": ["GML", "XML"]
                    },
                    "GlossSee": "markup"
                }
            }
        }
    }
}

My format:

"glossary" {
    "title"     "example glossary"
    "GlossDiv" {
        "title"     "S"
        "GlossList" {
            "GlossEntry" {
                "ID"        "SGML"
                "SortAs"    "SGML"
                "GlossTerm" "Standard Generalized Markup Language"
                "Acronym"   "SGML"
                "Abbrev"    "ISO 8879:1986"
                "GlossDef" {
                    "para"  "A meta-markup language, used to create markup languages such as DocBook."
                    "GlossSeeAlso" [
                        "GML"
                        "XML"
                    ]
                }
                "GlossSee" "markup"
            }
        }
    }
}

(Quotes are optional on most strings)


Assuming you are wanting to release this as an open source project, one of the following.

google code : http://code.google.com/ github : https://github.com/

If enough people like it and start using it, you could ask to have it added to as3corelib https://github.com/mikechambers/as3corelib

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜