aboutsummaryrefslogtreecommitdiffstats
path: root/test/JsonSpec.js
AgeCommit message (Collapse)Author
2012-03-28refactor(fromJson/toJson): move the contents of these files into Angular.jsIgor Minar
these files are now mostly empty so it doesn't make sense to keep them separated from other helper functions
2012-03-28refactor(toJson): use native JSON.stringifyIgor Minar
Instead of using our custom serializer we now use the native one and use the replacer function to customize the serialization to preserve most of the previous behavior (ignore $ and $$ properties as well as window, document and scope instances).
2012-03-28refactor(fromJson): always use native JSON.parseIgor Minar
This breaks IE7 for which you can use polyfill: https://github.com/douglascrockford/JSON-js <!--[if lt IE 8]> <script src="json2.min.js"></script> <![endif]--> or http://bestiejs.github.com/json3/ <!--[if lt IE 8]> <script src="json3.min.js"></script> <![endif]-->
2012-03-28refactor(fromJson/date filter): move date string logic to date filterIgor Minar
Breaks angular.fromJson which doesn't deserialize date strings into date objects. This was done to make fromJson compatible with JSON.parse. If you do require the old behavior - if at all neeeded then because of json deserialization of XHR responses - then please create a custom $http transform: $httpProvider.defaults.transformResponse.push(function(data) { // recursively parse dates from data object here // see code removed in this diff for hints }); Closes #202
2012-03-19fix(json): added support for iso8061 timezoneMisko Hevery
Added support of timezone in dates not just zulu timezone. This fixes issues for date filter which uses json deserialization under the hood. (for now) Closes #/800
2012-01-03style: prefer single quotes + some whitespacesVojta Jina
2012-01-03refactor: remove old JSTD assertionsVojta Jina
So that we can run the tests even without JSTD :-D
2011-11-14refactor(json): break dependence on api.jsMisko Hevery
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-10-11fix(filter): make json filter ignore private propertiesMisko Hevery
2011-07-18feat(strict mode): adding strict mode flag to all js filesIgor Minar
the flag must be in all src and test files so that we get the benefit of running in the strict mode even in jstd the following script was used to modify all files: for file in `find src test -name "*.js"`; do echo -e "'use strict';\n" > temp.txt cat $file >> temp.txt mv temp.txt $file done
2011-06-08Cleanup parser code to expose smaller APIMisko Hevery
2011-06-08fix JSON to match native browser behaviorMisko Hevery
2011-05-31Rename deprecated wasCalled() -> toHaveBeenCalled() in all specsVojta Jina
As well as wasNotCalled(), wasCalledWith(), wasNotCalledWith()
2011-01-14fixed select with ng:formatMisko Hevery
select (one/multiple) could not chose from a list of objects, since DOM requires string ids. Solved by adding index formatter, which exposed incorrect handling of formatters in select widgets.
2010-12-22fromJson delegation to native JSON parser if availableIgor Minar
- native parser delegation - $xhr change to use native parser
2010-12-11Stricter JSON parsing, for securityMisko Hevery
2010-11-16Changed error handling so that better stack traces are displayed in the ↵Misko Hevery
ng-errors
2010-11-08Support ISO 8601 extended datetime format troughout angular.Igor Minar
Support ISO 8601 extended format datetime strings (YYYY-MM-DDTHH:mm:ss.SSSZ) as defined in EcmaScript 5 throughout angular. This means that the following apis switched from YYYY-MM-DDTHH:mm:ssZ to YYYY-MM-DDTHH:mm:ss.SSSZ (note the added millis) when representing dates: - angular.Date.toString - angular.String.toDate - JSON serialization and deserialization (used by json filter, $xhr and $resource)
2010-11-05Updated toJson() to not serialize window/document objects.Vojta Jina
The reason to void these to objects is that they cause all sorts of problems like exceptions being thrown and infinite loops occuring when we iterate over object properties.
2010-11-05Changed toJson() to not ignore $ propertiesVojta Jina
2010-11-05Json - corrected test descriptions and changed to BDD style expect()Vojta Jina
2010-11-05fix error in json parser which did not allow 1.2E10 as numberMisko Hevery
2010-11-03Serialize RegExp to string in JSON. Closes #119.Elliott Sprehn
2010-10-20fixed negative numbers in JsonMisko Hevery
2010-10-18JSON parser is now strict (ie, expressions are not allowed for security)Misko Hevery
Close #57