Comments (10)
@penland365 Hello, What version of Argo are you using? The global decode
function might not be available in your version. If it is, you should be able to decode the json into the array like so:
let people: People? = decode(j)
The decode
function takes the AnyObject
and returns the decoded type/types, which, in this case, is People
or [Person]
. If that isn't working for you, would you mind posting more code around the issue so I can see what might be wrong?
from argo.
Hi @tonyd256 - I'm currently on Using Argo (0.4.3)
according to my Podfile
- what version do I need to be at?
from argo.
Hmm, this may be a cocoa pods
issue, I'm not sure - decode.swift
is in the project, but Swift swears by all the compiler gods that it cannot find it. decode
is the only thing I haven't been able to find however.
from argo.
Can you share your podfile? ( Or at least the relevant line?)
On Apr 13, 2015, at 18:26, Jeffrey N. Davis [email protected] wrote:
Hmm, this may be a cocoa pods issue, I'm not sure - decode.swift is in the project, but Swift swears by all the compiler gods that it cannot find it. decode is the only thing I haven't been able to find however.
—
Reply to this email directly or view it on GitHub.
from argo.
platform :ios, '8.0'
use_frameworks!
target 'jonah' do
pod 'Argo'
end
target 'jonahTests' do
pod 'Argo'
end
I've excluded additional pods, but that's the meat of it. That could be wrong format - I'm a Scala guy dipping in to another world here. But I do have access ( and do use ) most if not all of the operators in both JSONOperators.swift
and Operators.swift
Running pod install
gives Using Argo 0.4.3 (was 0.4.3)
from argo.
A bit more information - I tried running off of master w/ the following:
platform :ios, '8.0'
use_frameworks!
target 'jonah' do
pod 'Argo', :git => 'https://github.com/thoughtbot/Argo.git'
end
target 'jonahTests' do
pod 'Argo', :git => 'https://github.com/thoughtbot/Argo.git'
end
In this case, I can see the decode.swift
file:
The compiler is still confused however and it can't see it. Running pod install
gives the version here at 0.4.2
from argo.
To give a bit of an update, I can't compile w/ Swift 1.2
off of master, 0.4.2
. I'm being told that no such module Box
has been found in the file Decoded.swift
from argo.
You really shouldn't be pointed at master
. We'd rather you point at a specific release.
The reason you aren't finding Box
is because it hasn't been added to the Podfile
from argo.
RIP penland365, stung by a build tool.
from argo.
Hahaha. Glad that helped, sorry it took so long to get there.
from argo.
Related Issues (20)
- error: no such module 'Runes' HOT 7
- Problem with Decodable on xcode 9 HOT 3
- RFC: Renaming the Decodable protocol
- How to decode a "Dictionary" to "[Model]"? HOT 3
- Parse nested array failed HOT 5
- Parse nested model fails when adding a specific key HOT 2
- How to decode dynamic keys HOT 2
- RFC: Renaming (or removing) the `<|` family of operators HOT 5
- Decode type 'Any' HOT 2
- RFC: Make Swift.Decodable conform to Argo.Decodable in Swift 4.1 HOT 4
- Convert all wrong type return JSON to specific type HOT 6
- Decoding the same object with different keys HOT 6
- How to parse an empty dictionary object in Argo HOT 1
- [Question] Array decoding HOT 4
- Using pure can't compile using Swift 3 HOT 2
- Decodable' is ambiguous for type lookup in this context (Swift4) HOT 1
- Parsing a json array with strings and objects intermixed HOT 2
- Xcode 11.0 compatibility issue HOT 3
- Xcode 11.2.1 Binary operator '<^>' cannot be applied to operands of type HOT 7
- Upgrade to version 5.0.0 blocked due to Ogra library HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argo.