---
title: "MTStyleParser | Mobile sdk | Mobile sdk ios | Ios"
description: "A parser responsible for extracting offline dependencies (sprites and glyphs) from a style JSON payload."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTStyleParser

```
public struct MTStyleParser
```

A parser responsible for extracting offline dependencies (sprites and glyphs) from a style JSON payload.

-   `[init()](#/s:11MapTilerSDK13MTStyleParserVACycfc)`
    
    Undocumented
    
    #### Declaration
    
    Swift
    
    ```
    public init()
    ```
    
-   `[extractDependencies(from:)](#/s:11MapTilerSDK13MTStyleParserV19extractDependencies4fromAA0dG0V10Foundation4DataV_tKF)`
    
    Parses the raw style JSON data to extract non-tile dependencies like sprites and glyphs.
    
    Throws
    
    `DecodingError` if the JSON is malformed or required fields are incorrectly formatted.
    
    #### Declaration
    
    Swift
    
    ```
    public func extractDependencies(from data: Data) throws -> MTStyleDependencies
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>data</em></code></td><td><div><p>The raw JSON data of the style.</p></div></td></tr></tbody></table>
    
    #### Return Value
    
    An `[MTStyleDependencies](https://docs.maptiler.com/mobile-sdk/ios/api/Structs/MTStyleDependencies/)` object containing the extracted references.
