You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
project. It provides a dynamic, but more succinct API than the above options.
153
153
154
-
##Install ServiceStack.Text
154
+
### JS Utils
155
155
156
-
PM> Install-Package ServiceStack.Text
156
+
ServiceStack.Text APIs for deserializing arbitrary JSON requires specifying the the Type to deserialize into. An alternative flexible approach to read any arbitrary JavaScript or JSON data structures is to use the high-performance and memory efficient JSON utils in
157
+
[ServiceStack Templates](http://templates.servicestack.net) implementation of JavaScript.
157
158
158
-
> From v4.0.62+ [ServiceStack.Text is now free!](https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/v4.0.62.md#servicestacktext-is-now-free)
159
+
```csharp
160
+
JSON.parse("1") //= int 1
161
+
JSON.parse("1.1") //= double 1.1
162
+
JSON.parse("'a'") //= string "a"
163
+
JSON.parse("{a:1}") //= new Dictionary<string, object> { {"a", 1 } }
164
+
```
159
165
160
-
Support for PCL platfroms requires PCL adapters in:
166
+
#### Eval
167
+
168
+
Since JS Utils is an essential part of [ServiceStack Template language](http://templates.servicestack.net) it allows for advanced scenarios like implementing a text DSL or scripting language for executing custom logic or business rules you want to be able to change without having to compile or redeploy your App. It uses [Templates Sandbox](http://templates.servicestack.net/docs/sandbox) which lets you evaluate the script within a custom scope that defines what functions
ServiceStack's JS Utils is available in the [ServiceStack.Common](https://www.nuget.org/packages/ServiceStack.Common) NuGet package.
190
+
191
+
## Install ServiceStack.Text
192
+
193
+
PM> Install-Package ServiceStack.Text
194
+
195
+
> From v4.0.62+ [ServiceStack.Text is now free!](https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/v4.0.62.md#servicestacktext-is-now-free)
165
196
166
197
## Copying
167
198
168
199
Since September 2013, ServiceStack source code is available under GNU Affero General Public License/FOSS License Exception, see license.txt in the source. Alternative commercial licensing is also available, contact [email protected] for details.
169
200
170
201
## Contributing
171
202
172
-
Commits can be made to either the **master** (v4) or **v3** release branches.
173
203
Contributors need to approve the [Contributor License Agreement](https://docs.google.com/forms/d/16Op0fmKaqYtxGL4sg7w_g-cXXyCoWjzppgkuqzOeKyk/viewform) before any code will be reviewed, see the [Contributing wiki](https://github.com/ServiceStack/ServiceStack/wiki/Contributing) for more details.
0 commit comments